Adel Omar Technical Blog

A Day to Day technical blogging .

Configure GitHub Desktop/Windows to Work with a Proxy?

Github Desktop

I downloaded the GitHub Desktop application and can connect my account, but doing pushes/pulls fails because of an unresolved host.

I was having an issue with proxy settings and github desktop, after looking for a solution to this problem , i found it can be solved with one of the following:

First: throw Git Shell:

So actually the solution was to type this command into the git shell.

git config --global http.proxy http://<proxy-ip>:<proxy-port>
 

Second : 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

    git config --global http.proxy proxy_address:proxy_port
    git config --global https.proxy proxy_address:proxy_port
    
    //If username and password are not that much important then use:
    
    git config --global http.proxy username:password@proxy_address:proxy_port
    git config --global https.proxy username:password@proxy_address:proxy_port
    

and save.

  1. Now you can add, create and clone repos in Github Desktop.

That’s it for now.

hope this can help you , Let me know if you have any questions or comments.


Share

comments powered by Disqus