githubproxygithub-for-windows

GitHub Windows client behind proxy


I'm trying to get the GitHub client for Windows working. I am on a corporate Windows 7 x64 computer behind a corporate proxy and firewall.

Following various other posts and experimenting with multiple combinations of environment variables and configuration 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 another way to get this to work?

Additional notes:

The following worked:

The following did not work:

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 it is followed by the output of several failed proxy authentication attempts, all of which indicate "Credentials are missing."


Solution

  • 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>