大体步骤:配置npm,在github中增加自己的sshkey。

多sshkey的话在用户主目录的.ssh中要配置好。

删除仓库里面 source/_posts/我的文章.md

执行下面命令更新博客

hexo g == hexo generate#生成
hexo s == hexo server #启动服务预览
hexo d == hexo deploy#部署

生成ssh方法,多个shh

1.生成指定名字的密钥

ssh-keygen -t rsa -C "邮箱地址" -f ~/.ssh/github_jslite

会生成 github_jslitegithub_jslite.pub 这两个文件

2.密钥复制到托管平台上

vim ~/.ssh/github_jslite.pub

打开公钥文件 github_jslite.pub ,并把内容复制至代码托管平台上

3.修改config文件

vim ~/.ssh/config #修改config文件,如果没有创建 config

Host jslite.github.com
HostName github.com
User git
IdentityFile ~/.ssh/github_jslite Host abc.github.com
HostName github.com
User git
IdentityFile ~/.ssh/github_abc

添加到博客的config文件中

git remote add origin git@jslite.github.com:JSLite/JSLite.git

4.测试

ssh -T git@jslite.github.com # @后面跟上定义的Host

最新文章

  1. eclipse怎么打开工程文件的所在位置
  2. MySQL replace into 使用详解 及 注意事项
  3. QT 记事本小程序
  4. jQuery ajax - serialize() 方法-输出序列化表单值
  5. 资源绑定ResourceBundle
  6. ruby -- 基础学习(二) 外键配置实现级联删除
  7. idea修改jsp后不会自动编译和替换(转)
  8. 仿jQuery中undelegate()方法功能的函数
  9. 到底该不该熟悉掌握struts2的ONGL呢?
  10. Android 仿微信滑动删除
  11. 利用汇编查看C++函数调用
  12. android5.0(Lollipop) BLE Peripheral深入理解系统篇之提高篇
  13. ViewRootImpl和WindowManagerService笔记
  14. nodeJS之TCP模块net
  15. 【Lua】特性和一些基础语法
  16. javascript中的立即执行函数的原理
  17. NC 5导出Excel
  18. codeforces 873C - Strange Game On Matrix
  19. 8.Python爬虫实战一之爬取糗事百科段子
  20. 写一个简单的C词法分析器

热门文章

  1. HDU 1257最少拦截系统[动态规划]
  2. Unable to cast object of type 'System.String' to type 'System.Int32'.
  3. 1.Jenkins基本安装及插件离线安装
  4. 上传excel文件,读取内容,增加事务写入数据库
  5. centos7 国内镜像yum安装mysql5.7
  6. NOIP 2004 T3 合唱队形(DP、最长上升/下降子序列)
  7. Yahoo!团队:网站性能优化的35条黄金守则
  8. Android activity 亮度调整
  9. Linux系统安装及配置ftp服务
  10. JAVA循环结构学校上机经常遇到的几题 笔记