官方语法:

// http: 
git config [--global] http.proxy[protocol://][user[:password]@]proxyhost[:port]
// https: 
git config [--global] https.proxy[protocol://][user[:password]@]proxyhost[:port]

单个项目配置:

git config http.proxy socks5://user:password@localhost:1080
git config https.proxy socks5://user:password@localhost:1080

全局配置:

git config --global http.proxy socks5://user:password@localhost:1080
git config --global https.proxy socks5://user:password@localhost:1080
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐