Posts git 代理
Post
Cancel

git 代理

1. 基本设置

  • 系统设置
      git config --system --list
    
  • 用户设置
      git config --global  --list
    
  • 仓库设置
      git config -- local    --list
    

2. 设置代理

  • 仅设置github代理

    1
    2
    3
    
      // socks5
      git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
      git config --global https.https://github.com.proxy socks5://127.0.0.1:1080
    
    1
    2
    3
    
      // http
      git config --global http.https://github.com.proxy http://127.0.0.1:1080
      git config --global https.https://github.com.proxy http://127.0.0.1:1080
    

3. 取消代理

  • 仅取消个别网站代理

    1
    2
    
      git config --global --unset http.https://github.com.proxy
      git config --global --unset https.https://github.com.proxy
    
This post is licensed under CC BY 4.0 by the author.

Contents

Trending Tags