Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

New to working with git in Windows. I downloaded the GitHub Desktop application and can connect my account, but doing pushes/pulls fails because of an unresolved host. Asking around the workplace I got the following suggestion to type this command into the git shell.

git config --global http.proxy http://username:[email protected]:8080

Does this:

  1. Store my password in plain text?
  2. Send my password in plain text?

Doesn't GitHub for Desktop generate and use SSH keys instead (I got an email notification when I first connected my account)? How can I configure GitHub Desktop to work with this proxy?

like image 400
raphael Avatar asked Jul 27 '16 14:07

raphael


People also ask

How do I put GitHub on my desktop Windows 10?

Visit the download page for GitHub Desktop. Click Download for Windows. In your computer's Downloads folder, double-click the GitHub Desktop setup file. GitHub Desktop will launch after installation is complete.


1 Answers

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.

like image 182
Sayan Mandal Avatar answered Nov 06 '22 16:11

Sayan Mandal