阿里山QQ

导航

设置git的http代理

如果git仓库不和本地代码之间不可以直达,这个时候就可以考虑使用git 代理的方式提交代码到git仓库了;

git http代理或者https代理,配置在~/.gitconfig 文件下,可以直接编辑该文件或者使用命令git config --global --edit打开该文件,进行编辑,编辑内容如下:

[root@jumpserver ~]# cat ~/.gitconfig 
[user]
        name = qiangqiang.chang
        email = qiangqiang.chang@xxxxx.com
[http]
        proxy=http://gitproxy.i.xxxxx.com:8889
[https]
        proxy=http://gitproxy.i.xxxxx.com:8889

  

posted on 2017-03-02 17:22  阿里山QQ  阅读(237)  评论(0编辑  收藏  举报