Skip to content

Instantly share code, notes, and snippets.

@why168
Last active March 13, 2024 13:32
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save why168/9b30f542ff6008d1f66297474a2844de to your computer and use it in GitHub Desktop.
Save why168/9b30f542ff6008d1f66297474a2844de to your computer and use it in GitHub Desktop.

Git-Shadowsocks与git代理配置

# 设置配置

# Windows默认1080端口
git config --global https.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'

# Mac默认1087端口
git config --global https.proxy http://127.0.0.1:1087
git config --global https.proxy https://127.0.0.1:1087
git config --global http.proxy 'socks5://127.0.0.1:1087'
git config --global https.proxy 'socks5://127.0.0.1:1087'
# 取消配置代理
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
#当前终端配置代理
export http_proxy='127.0.0.1:1087'
curl ip.gs

# 删除代理
unset http_proxy
@CastleOnTheHill
Copy link

git config --global http.proxy http://127.0.0.1:1080
git config --global https.proxy http://127.0.0.1:1080
works for me on windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment