Git设置和取消代理

本地开启VPN后,GIt也需要设置代理,才能正常略过GFW,访问google code等网站

(1)设置代理

  • SSR Client

git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global http.proxy 'socks5://127.0.0.1:1080' 
git config --global https.proxy 'socks5://127.0.0.1:1080'
  • Privoxy
git config --global http.proxy http://192.168.16.28:8118
git config --global https.proxy https://192.168.16.28:8118

或者编辑用户目录下的~/.gitconfig

[http]
proxy = http://username:password@host:port
[https]
proxy = http://username:password@host:port

(2)取消代理

$ git config --global --unset http.proxy
$ git config --global --unset https.proxy
上一篇 IDEA设置SSR本地代理
下一篇 Linux常用命令设置和取消代理
目录
文章列表
1 Swift - class与staitc关键字的区别与使用(类方法、静态方法)
Swift - class与staitc关键字的区别与使用(类方法、静态方法)
2
Vue使用axios实现登录验证拦截及页面跳转
Vue使用axios实现登录验证拦截及页面跳转
3
Kibana添加filter
Kibana添加filter
4
Zuul动态路由源码及几种实现方式
Zuul动态路由源码及几种实现方式
5
Python使用POP3读取邮箱中的邮件,含文本及附件
Python使用POP3读取邮箱中的邮件,含文本及附件
最新评论
一位WordPress评论者
一位WordPress评论者
2月12日
您好,这是一条评论。若需要审核、编辑或删除评论,请访问仪表盘的评论界面。评论者头像来自 Gravatar。