当git pull或push时经?;嵊龅紺ould not read from remote repository的报错,尤其是在启用Clash等代理软件后
# git push
kex_exchange_identification: Connection closed by remote host
Connection closed 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代理来保障网络通畅,添加~/.ssh/config文件,配置如下内容
# cat ~/.ssh/config
Host github.com
User git
Hostname github.com
Port 22
ProxyCommand nc -v -x localhost:7890 %h %p
ProxyCommand依赖nc,服务器上需要提前安装nc
# apt-get install ncat
Copyright ? 2013-2024 8a.hk All Rights Reserved. 八艾云 版权所有 中山市八艾云计算有限公司 粤ICP备14095776号 粤公网安备 44200002445359号
增值电信业务经营许可证编号:B1-20222012
代理域名注册服务机构:西部数码