问题

在使用 hexo d 部署博客和使用 Git/Github 进行 git push -u origin master 时遇到了以下问题:

  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 remote add origin-https https://github.com/github.com:MaugerWu/MaugerWu.github.io.git

git push -u origin-https master

如果可以,那肯定是你的SSH端口被关闭了。 您可以继续使用此替代语法,尝试在您的计算机或 ISP 上取消阻止端口 22,或查看建议:http://stackoverflow.com/a/8081292/27310

参考

相关文章:

  • 2021-10-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-25
  • 2021-12-28
  • 2021-12-17
  • 2021-08-19
猜你喜欢
  • 2022-12-23
  • 2021-08-28
  • 2022-01-08
  • 2021-11-04
  • 2021-11-06
  • 2021-07-27
  • 2021-05-22
相关资源
相似解决方案