Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reset git proxy to default configuration

Tags:

git

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 https://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/  # Configuration. Common proxy ports are 3128, 8123, 8000. _proxy=proxy.yourcompany.com _proxyport=3128  exec socat STDIO PROXY:$_proxy:$1:$2,proxyport=$_proxyport 

then I configured git to use it:

$ git config --global core.gitproxy gitproxy 

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

like image 581
Ahmed Elshafei Avatar asked Jun 29 '12 16:06

Ahmed Elshafei


People also ask

How do I change my proxy settings in Git?

Setting the proxy for Gitgit config --global --add http. proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT. git config --global --add https. proxy http://USERNAME:PASSWORD@PROXY_ADDRESS:PROXY_PORT.

How do I get rid of proxy?

To remove a proxy server by using the Netsh.exe toolClick Start, click Run, type cmd, and then click OK. At the command prompt, type netsh winhttp reset proxy, and then press ENTER.


2 Answers

For me, I had to add:

git config --global --unset http.proxy 

Basically, you can run:

git config --global -l  

to get the list of all proxy defined, and then use "--unset" to disable them

like image 174
sramij Avatar answered Oct 16 '22 08:10

sramij


You can remove that configuration with:

git config --global --unset core.gitproxy 
like image 25
Mark Longair Avatar answered Oct 16 '22 08:10

Mark Longair