Git 命令使用或取消代理

Git 命令使用或取消代理

假设代理到目标 socks5://127.0.0.1:10808

  1. 全局代理 git config –global http.proxy socks5://127.0.0.1:10808 git config –global https.proxy socks5://127.0.0.1:10808
  2. 部分代理 git config –global http.https://github.com.proxy socks5://127.0.0.1:10808 git config –global https.https://github.com.proxy socks5://127.0.0.1:10808
  3. 取消代理 git config –global –unset http.proxy git config –global –unset https.proxy

参考自: https://blog.gobyte.cn/post/1a22163b.html https://blog.csdn.net/tanningzhong/article/details/52817399

Licensed under CC BY-NC-SA 4.0
最后更新于 May 19, 2025 00:28 +0800
comments powered by Disqus
使用 Hugo 构建
主题 StackJimmy 设计