使用 clash 代理无法 clone 的解决方案

247 阅读1分钟

git clone git@github.com:xxxx/yyyy.git Cloning into 'yyyyyy'... Connection closed by 198.18.4.1 port 22 fatal: Could not read from remote repository.

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

原因:22 端口被节点服务器屏蔽

解决方案:docs.github.com/en/authenti…

使用 https 建立 ssh 连接,编辑~/.ssh/config 文件

Host github.com
    Hostname ssh.github.com
    Port 443
    User git