git设置代理

一. git 设置http代理

  1.设置代理 http/https协议(clone https://前缀的repo会走ss)

   
git config --global http.proxy 'socks5://127.0.0.1:1080'
git config --global https.proxy 'socks5://127.0.0.1:1080'

 

   会在~/.gitconfig下加上对应代理
2.git@github.com走的是ssh协议,所以配置ssh代理
 
   配置.ssh/config (确保安装了 NetCat)
   
    Host github.com bitbucket.org
    ProxyCommand            nc -x 127.0.0.1:1080 %h %p

posted on   帅胡  阅读(609)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· AI 智能体引爆开源社区「GitHub 热点速览」
· 写一个简单的SQL生成工具
历史上的今天:
2015-07-10 scp,ssh双机互信操作步骤
2015-07-10 PyQt多窗口调用

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示