How Can I Configure GitHub Desktop/Windows to Work with a Proxy?
To directly add a proxy to Github Desktop without using git shell:
Set up/Sign in to your account in Github Desktop(This won't be a problem, proxy only doesn't allow you to Add, create or clone repo)
Close Github Desktop for the time being(to set up proxy).
Go to
C:\Users\@yourusername
.There you will find a file named .gitconfig
Open it with any text editor(I have used sublime text 3) and add
[http]
proxy = http://username:[email protected]:8080
and save.
- Now you can add, create and clone repos in Github Desktop.
Note(for TFS users): TFS will return 502 bad gateway error when you use the above proxy configuration. Use hash # to comment out the proxy config in .gitconfig to switch between Git and TFS.
So actually the solution was to type this command into the git shell.
git config --global http.proxy http://<proxy-ip>:<proxy-port>