github hexo配置踩过的坑
2024-09-01 15:20:54
大体步骤:配置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_jslite
和github_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
最新文章
- eclipse怎么打开工程文件的所在位置
- MySQL replace into 使用详解 及 注意事项
- QT 记事本小程序
- jQuery ajax - serialize() 方法-输出序列化表单值
- 资源绑定ResourceBundle
- ruby -- 基础学习(二) 外键配置实现级联删除
- idea修改jsp后不会自动编译和替换(转)
- 仿jQuery中undelegate()方法功能的函数
- 到底该不该熟悉掌握struts2的ONGL呢?
- Android 仿微信滑动删除
- 利用汇编查看C++函数调用
- android5.0(Lollipop) BLE Peripheral深入理解系统篇之提高篇
- ViewRootImpl和WindowManagerService笔记
- nodeJS之TCP模块net
- 【Lua】特性和一些基础语法
- javascript中的立即执行函数的原理
- NC 5导出Excel
- codeforces 873C - Strange Game On Matrix
- 8.Python爬虫实战一之爬取糗事百科段子
- 写一个简单的C词法分析器
热门文章
- HDU 1257最少拦截系统[动态规划]
- Unable to cast object of type 'System.String' to type 'System.Int32'.
- 1.Jenkins基本安装及插件离线安装
- 上传excel文件,读取内容,增加事务写入数据库
- centos7 国内镜像yum安装mysql5.7
- NOIP 2004 T3 合唱队形(DP、最长上升/下降子序列)
- Yahoo!团队:网站性能优化的35条黄金守则
- Android activity 亮度调整
- Linux系统安装及配置ftp服务
- JAVA循环结构学校上机经常遇到的几题 笔记