0%

hexo 部署报错


今年的1月份还一切正常,二月份的时候,当我部署当github上时,发现报错了:fatal: could not read Username for ‘GitHub’

解决办法:

修改配置文件:

根目录下的_config.yml,修改deploy节点。

原来的配置为:

1
2
3
4
deploy:
type: git
repo: https://github.com/yourname/yourname.github.io.git
branch: master

修改为如下:

1
2
3
4
deploy:
type: git
repo: https://yourname:yourpassword@github.com/yourname/yourname.github.io.git
branch: master

好了,成功,如果不行,再去找找其他的解决办法把

-------------本文结束感谢您的阅读-------------
没办法,总要恰饭的嘛~~