Hexo部署过程中可能会出现错误 {#Hexo部署过程中可能会出现错误}
|---------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1 2 3 4 5 6 7 8 9
| fatal: unable to access 'https://github.com/yourname/yourname.github.io/': Encountered end of file FATAL { err: Error: Spawn failed at ChildProcess.<anonymous> (/blog/node_modules/hexo-util/lib/spawn.js:51:21) at ChildProcess.emit (events.js:376:20) at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12) { code: 128 } } Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html
|
解决方法一 {#解决方法一}
|---------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------|
| 1 2 3 4 5 6 7 8 9 10 11
| ##进入站点根目录 cd /blog ##删除git提交内容文件夹 rm -rf .deploy_git/ ##执行 git config --global core.autocrlf false ##最后 hexo clean && hexo g && hexo d
|
解决方法二 {#解决方法二}
有可能是你的git repo配置地址不正确,可以将http方式变更为ssh方式
|-------------------|----------------------------------------------------------------|
| 1 2 3 4 5
| ##进入站点根目录 cd /blog ##修改_config.yml配置文件 vim _config.yml
|
|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 1 2 3 4 5
| ##修改 deploy: type: git repo: https://github.com/yourname/yourname.github.io.git -> git@github.com:a956551943/weixiaohui.github.io.git branch: master
|
|-------------|---------------------------------------------|
| 1 2
| ##最后 hexo clean && hexo g && hexo d
|
解决方法三 {#解决方法三}
不建议使用该方法
|-------------------------|-----------------------------------------------------------------------------|
| 1 2 3 4 5 6 7 8
| ##进入站点根目录 cd /blog ##进入depoly文件夹 cd .deploy_git/ ##强制推送 git push -f
|