Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitHub Windows client behind proxy

I'm trying to get the GitHub client for Windows working. I am on a corporate Win 7 x64 computer behind a corporate proxy and firewall. Following various other posts and experimenting with multiple combinations of environment variables and config variables I have found the only way to get cloning and push updates to work is by using the HTTPS_PROXY environment variable, including my full corporate domain user ID and password.

This is unacceptable from a security standpoint. Is there any other way to get this to work?

Additional notes:

The following worked:

  • Add an environment variable called HTTPS_PROXY with the value http://[domain]\[userid]:[password]@someproxy.mycorp.com:8080

The following did not work:

  • Omitting user id and password from HTTPS_PROXY variable
  • Using an environment variable called HTTP_PROXY (no S)
  • Adding the http.proxy variable to the global config file (.gitconfig)
  • Adding the https.proxy variable to the global config file

In all cases, the GitHub client still does not recognize the proxy: The content of the file TheLog.txt always shows the following on startup:

[time]|INFO|thread:4|GitHub.Helpers.StartupLogger|Proxy information: (None) [time]|INFO|thread:4|GitHub.Helpers.StartupLogger|Couldn't fetch creds for proxy 

And is followed by the output of several failed proxy authentication attempts, all of which indicate "Credentials are missing."

like image 555
Joshua Honig Avatar asked Apr 22 '13 17:04

Joshua Honig


1 Answers

Add these entries to your '.gitconfig' file in your user directory (go to %USERPROFILE%):

[http]     proxy = http://<proxy address>:<proxy port>  [https]     proxy = https://<proxy address>:<proxy port> 

And if you don't want to store your password in plaintext, I would use a local proxy forwarder like CNTLM which allows you to direct all traffic through it and can store the passwords hashed.


Unlike the original question, if you don't care if your password is in plain text add these:

[http]     proxy = http://<username>:<password>@<proxy address>:<proxy port>  [https]     proxy = https://<username>:<password>@<proxy address>:<proxy port> 
like image 140
Sogger Avatar answered Sep 28 '22 13:09

Sogger