关于Github失联的咪咪
记录一些github的神经报错
Github网页正常访问, 提交不了代码
报错信息如下:
Connection reset by 20.205.243.166 port 22
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解决方案:
修改.ssh
目录下的配置文件config
Host github.com
port 22
User git
HostName github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
# 端口号为你开启代理的端口号,这里7890是Clash默认端口号
ProxyCommand connect -S 127.0.0.1:7890 -a none %h %p
- User: 配置使用用户名
- HostName: 真实的域名地址
- PreferredAuthentications: 配置登录时使用什么权限认证, 可选值
publickey
password
keyboard-interactive
- IdentityFile: id_rsa密钥的路径
- ProxyCommand: 设置代理
- -S: 代表走socks代理
- -H: 实现http和https的仓库clone
- %h: 扩展成hostname
- %p: 扩展成port