搭建github博客常见错误

1.错误一

(1)错误内容

FATAL Something’s wrong. Maybe you can find the solution here: http://hexo.io/docs/troubleshooting.html

(2)原因
端口被占用,在浏览器窗口已经打开过http://localhost:4000/

(3)解决方法
用命令换个端口——sudo hexo s -p 5000

2.错误二

(1)错误内容
ERROR Deployer not found: git
(2)原因
没有安装hexo发布相关的npm包。

(3)解决方法
安装缺少的包——npm install hexo-deployer-git –save

3.错误三

(1)错误内容
github提示Permission denied (publickey)
(2)原因
本地公钥和github设置中的公钥不匹配。
(3)解决方法

方法一: 重新复制 公钥 并粘贴到ssh key中。
方法二:删除原来的所有ssh key,新建一个,再粘贴之前生成的公钥。
方法三:使用命令——ssh-add -K ~/.ssh/id_rsa
具体参考—— Adding your SSH key to the ssh-agent

猜你喜欢

转载自blog.csdn.net/bengxu/article/details/80358873