将git代理重置为默认配置

将git代理重置为默认配置

本文介绍了将git代理重置为默认配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我安装Socat以使用Git协议通过HTTP CONNECT代理,然后在您的bin目录中创建名为 gitproxy 的脚本。

I installed Socat to Use the Git Protocol Through a HTTP CONNECT Proxy, then I Create a script called gitproxy in your bin directory.

#!/bin/sh
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy
#
# More details at http://tinyurl.com/8xvpny

# Configuration. Common proxy ports are 3128, 8123, 8000.
_proxy=proxy.yourcompany.com
_proxyport=3128

exec socat STDIO PROXY:$_proxy:$1:$2,proxyport=$_proxyport

然后我配置 git 以使用它:

then I Configured git to use it:

$ git config --global core.gitproxy gitproxy

现在,我想将git重置为默认代理配置,我该怎么办?

Now, I want to reset git to the default proxy configurations, How can I do ?

推荐答案

您可以使用以下方式删除配置:

You can remove that configuration with:

git config --global --unset core.gitproxy

这篇关于将git代理重置为默认配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 19:15