找到
1
篇与
git
相关的结果
-
git如何设置代理 临时设置 打开 Git Bash,使用命令临时设定: socks代理 git config --global http.proxy 'socks5:socks5端口号' git config --global https.proxy 'socks5://127.0.0.1:10809' http代理 git config --global http.proxy 'IP:PORT' git config --global https.proxy 'https://127.0.0.1:10809'永久设置 若想要设置代理永久生效,则可以把它写入 .gitconfig 文件中。使用 vi 打开 .gitconfig 文件:vi ~/.gitconfig写入下列配置(建议在最末写入): [http] proxy = socks5://127.0.0.1:socks5端口号 proxy = http://127.0.0.1:http端口号 [https] proxy = socks5://127.0.0.1:socks5端口号 proxy = https://127.0.0.1:http端口号修改后重启 git ,使配置生效: git config -l --global查看当前代理 git config -l可以看到自己所配置的端口信息,则说明配置成功。 图片 取消代理 git config --global --unset http.proxy git config --global --unset https.proxy