- 工信部备案号 滇ICP备05000110号-1
- 滇公安备案 滇53010302000111
- 增值电信业务经营许可证 B1.B2-20181647、滇B1.B2-20190004
- 云南互联网协会理事单位
- 安全联盟认证网站身份V标记
- 域名注册服务机构许可:滇D3-20230001
- 代理域名注册服务机构:新网数码
Git Pull&Git Push配置SSH代理
蓝队云小课堂:
当git pull或push时经常会遇到Could 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
更多小知识,可联系蓝队云一起探讨。
售前咨询
售后咨询
备案咨询
二维码
TOP