Git set & unset proxy to avoid “git clone can’t resolve proxy” error

I keep get “git clone can’t resolve proxy” error while I use Git for my open source projects at home and in my office (Behind Firewall) interchangeably. I need to manually set and unset proxy based on where I work (Home – > unset proxy; Office – > set proxy)


Set Proxy [If you are behind Firewall]

C:\>git config –global http.proxy <your-win-user-name>@proxy.<>:8080”

Example :

C:\>git config –global http.proxy”


Un Set Proxy [Usually if you work from your home internet, no firewall]

git config –global –unset http.proxy




When I work Node Applications, I need to set the proxy if I am behind the firewall for node package manager (npm) to pull the required node dependencies


E:\>cd project\strobe > npm config set proxy “

E:\>cd project\strobe > npm install

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s