ssh:connect to host github.com port 22:network is unreachable

往github上提交时遇到这个问题,应该怎么办?

$ git push -u origin master
ssh: connect to host github.com port 22: Network is unreachable
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

阅读 6.3k
1 个回答
先确认远程库地址之类的是否正确
git remote -v
再确认远程库是否有推送权限

这个只能找源码库所有者解决了,理论上不是你自己的库,你只是使用者想贡献代码的话,先fork 然后pull request

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进