banner
NEWS LETTER

Git配置本地代理

Scroll down

本文作者:丁辉

Git配置本地代理

本地启动代理后,使用命令更改端口

配置代理

  • 全局代理

    1
    2
    git config --global http.proxy http://127.0.0.1:1080
    git config --global https.proxy http://127.0.0.1:1080
  • 针对特定网站代理

    1
    2
    3
    4
    5
    6
    7
    # http协议
    git config --global http.https://github.com.proxy https://127.0.0.1:1080
    git config --global https.https://github.com.proxy https://127.0.0.1:1080

    # 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
git config --global --list

取消 reset 代理设置

1
2
git config --global --unset http.proxy
git config --global --unset https.proxy

I'm so cute. Please give me money.

其他文章
cover
Git清除提交记录
  • 70/01/01
  • 00:00
  • Linux-Git
cover
磁盘清理
  • 70/01/01
  • 00:00
  • Linux-存储
目录导航 置顶
  1. 1. Git配置本地代理
    1. 1.1. 配置代理
    2. 1.2. 查看所有配置
    3. 1.3. 取消 reset 代理设置
请输入关键词进行搜索