背景
突然间代码 push 不上去,报如下错误:
Connection closed by 140.82.113.4 port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
发现有人也遇到过类似的问题,原因是 22 端口的问题
https://github.com/vernesong/OpenClash/issues/1960#issuecomment-1115732292
解决
解决方法参考
https://docs.github.com/zh/authentication/troubleshooting-ssh/using-ssh-over-the-https-port
修改 ~/.ssh/config
这个文件,添加以下内容
Host github.com
Hostname ssh.github.com
Port 443
User git
image.png
问题解决,可以提交代码
网友评论