[Git]22 端口被网络代理禁用
[Git]22 端口被网络代理禁用
Section titled “[Git]22 端口被网络代理禁用”Connection closed by 20.205.243.166 port 22kex exchange identification: Connection closed by remote host官方解决文档:
https://docs.github.com/zh/authentication/troubleshooting-ssh/using-ssh-over-the-https-port
22 端口被网络代理服务器禁用,导致 SSH 方式与 Github 交互报错,可以改为在 HTTPS 端口使用 SSH 来规避。
你在 ~/.ssh 目录下创建一个名为 config 的文件,没有文件后缀,输入 :
- 要保证 IdentityFile 路径正确,并且公钥已添加在对应的 github 账号
- 一个密钥只能支持一个账号,所以这里配置了多个账号
# GitHub selfHost github.comHostName ssh.github.comUser gitPort 443IdentityFile ~/.ssh/id_ed25519
# GitHubHost github.rdHostName ssh.github.comUser gitPort 443IdentityFile ~/.ssh/id_ed25519_hoorii_rdssh -T git@github.com
ssh -vvvT git@github.rd