当前位置:   article > 正文

github ssh: connect to host github.com port 22: Connection refused_git push -u gogs develop ssh: connect to host gogs

git push -u gogs develop ssh: connect to host gogs port 22: connection refus
  1. $ git pull
  2. ssh: connect to host github.com port 22: Connection refused
  3. fatal: Could not read from remote repository.
  4. Please make sure you have the correct access rights
  5. and the repository exists.

原因分析:应该是 ssh 指纹验证过期了

解决方法

要在 SSH 配置文件中设置此设置,请编辑或新建文件 ~/.ssh/config,并添加以下部分:

  1. Host github.com
  2. Hostname ssh.github.com
  3. Port 443
  4. User git

然后 git push,会提醒确认 ssh 指纹验证信息,输入 yes后,即可成功 git push。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/668880
推荐阅读
相关标签
  

闽ICP备14008679号