Refresh

This website wxory.com/archives/20576.html is currently offline. Cloudflare's Always Online™ shows a snapshot of this web page from the Internet Archive's Wayback Machine. To check for the live version, click Refresh.

Git Clone Ssh 走代理

新建一个 C:\Users\你的用户名.ssh\config 文件(没有扩展名,如果已存在此文件则不用新建),编辑此文件增加以下内容:

1
2
3
Host github.com *.github.com
User git
ProxyCommand connect -S 127.0.0.1:7890 %h %p

其中 Host 右边为需要走代理的域名列表,127.0.0.1:7890 替换为自己的代理服务器地址。
git clone http(s) 走代理

1
2
git config --global http.proxy "http://127.0.0.1:7890"
git config --global https.proxy "http://127.0.0.1:7890"

其中 127.0.0.1:7890 替换为自己的代理服务器地址。
转载自[imageoo]: https://www.imaegoo.com/2023/git-clone-ssh-proxy/ 仅收藏备用

作者

Wxory

发布于

2023-06-09

更新于

2024-03-02

许可协议

CC BY 4.0