代理后面的GitHub Windows客户端 [英] GitHub Windows client behind proxy

查看:142
本文介绍了代理后面的GitHub Windows客户端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图让Windows的GitHub客户端工作。我在企业代理和防火墙背后的企业Win 7 x64计算机上。继各种其他帖子并试验环境变量和配置变量的多种组合后,我发现克隆和推送更新工作的唯一方法是使用HTTPS_PROXY环境变量,包括我的完整公司域用户标识和密码。

从安全角度来看,这是不可接受的。有没有其他的方法可以使这个工作?



其他注意事项:



以下工作:




  • 添加名为 HTTPS_PROXY 的环境变量,其值 http: // [域] \ [userid]:[密码] @ someproxy.mycorp.com:8080



< 不是工作: variable
  • 使用名为 HTTP_PROXY (no S http.proxy 变量添加到全局配置文件( .gitconfig
  • / code>)
  • 向全局配置文件添加 https.proxy 变量



  • 在所有情况下,GitHub 客户端仍然无法识别代理:文件 TheLog.txt的内容 always 在启动时显示以下内容:

      [时间] |信息|线程:4 | GitHub.Helpers.StartupLogger |代理信息:(无)
    [时间] |信息|线程:4 | GitHub.Helpers.StartupLogger |无法获取代理$ b的信用$ b

    然后输出几次失败的代理身份验证尝试,所有这些都表示凭据丢失。

    解决方案

    将这些条目添加到用户目录中的'.gitconfig'文件中(转至%USERPROFILE%):

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

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

    如果您不想以纯文本存储您的密码,我会使用本地代理转发器就像CNTLM一样,它可以让你通过它传递所有流量,并且可以存储密码散列。




    问题,如果你不关心你的密码是纯文本的话添加这些:

    $ c> [http]
    proxy = http://< username>:< password> @<代理地址>:< proxy port>
    $ b [https]
    proxy = https://< username>:< password> @<代理地址>:< proxy port>


    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 varaible 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."

    解决方案

    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>
    

    这篇关于代理后面的GitHub Windows客户端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆