GitHub Windows client behind proxy

后端 未结 9 1463
抹茶落季
抹茶落季 2020-12-02 04:40

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 exp

相关标签:
9条回答
  • 2020-12-02 05:36

    I was able to make GitHub Shell to work with our corporate proxy. I'm starting GitHub Shell and execute following command:

    export http_proxy=http://<username>:<password>@<corporate proxy>:3128
    

    I would really like to make GUI to work too. But I don't want to set Windows global environment variable which contains my corporate credential information.

    Strangely GitHub GUI Client is able to connect to GitHub for user authentication, but only problem is with cloning, pulling and pushing projects from and into GitHub. It seems like the problem is with git implementation. I was able to configure git to run through our proxy without putting my credentials in the git global settings and it was asking for my credentials while performing pull or push requests. But that was working only in Git Shell.

    0 讨论(0)
  • 2020-12-02 05:42

    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>
    
    0 讨论(0)
  • 2020-12-02 05:44

    I found this blog to be useful. It describes ntlmaps proxy. It's probably less secure, but worked smoothly. I couldn't get cntlm working.

    0 讨论(0)
提交回复
热议问题