How Can I Configure GitHub Desktop/Windows to Work with a Proxy?

To directly add a proxy to Github Desktop without using git shell:

  1. 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)

  2. Close Github Desktop for the time being(to set up proxy).

  3. Go to C:\Users\@yourusername.

  4. There you will find a file named .gitconfig

  5. Open it with any text editor(I have used sublime text 3) and add

[http] proxy = http://username:[email protected]:8080

and save.

  1. 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>