在使用 hexo d
部署博客和使用 Git/Github 進行 git push -u origin master
時遇到了如下問題:html
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master Pushing to git@github.com:MaugerWu/MaugerWu.github.io.git Connection reset by 192.30.253.113 port 22 fatal: sha1 file '<stdout>' write error: Broken pipe fatal: The remote end hung up unexpectedly fatal: The remote end hung up unexpectedly
這代表 git 軟件沒法經過 SSH 鏈接到 Github:若是您的防火牆或 ISP 設置的防火牆阻止端口 22 上的 SSH 鏈接,一般會發生這種狀況。一個快速的解決方法,嘗試 Github 提供的HTTPS URL:git
git remote add origin-https https://github.com/github.com:MaugerWu/MaugerWu.github.io.git
github
git push -u origin-https master
hexo
若是能夠,那確定是你的SSH端口被關閉了。 您能夠繼續使用此替代語法,嘗試在您的計算機或 ISP 上取消阻止端口 22,或查看建議:http://stackoverflow.com/a/8081292/27310 。ssh