Ubuntu使用git无法读取远程仓库
Ubuntu Debian git使用git pull时提示
kex_exchange_identification: Connection closed by remote host
Connection closed by 20.205.243.166 port 22
fatal: 无法读取远程仓库。 请确认您有正确的访问权限并且仓库存在。
或
fatal: Could not read from remote repository.
可能是使用了网络代理导致的,可以使用443端口进行ssh连接 可参考一下链接进行处理 https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port
# 进入当前用户的.ssh目录
ubuntu@ubuntu-Virtual-Machine:~$ cd /home/ubuntu/.ssh
# 创建config文件夹
ubuntu@ubuntu-Virtual-Machine:~/.ssh$ touch config
ubuntu@ubuntu-Virtual-Machine:~/.ssh$ ls
config id_rsa id_rsa.pub
ubuntu@ubuntu-Virtual-Machine:~/.ssh$ vim config
将以下配置加入刚刚创建的config文件中
Host github.com
Hostname ssh.github.com
Port 443
User git