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

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

问题描述

我正在尝试让适用于 Windows 的 GitHub 客户端正常工作.我在公司代理和防火墙后面的公司 Win 7 x64 计算机上.遵循其他各种帖子并尝试环境变量和配置变量的多种组合,我发现使克隆和推送更新工作的唯一方法是使用 HTTPS_PROXY 环境变量,包括我的完整公司域用户 ID 和密码.

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?

以下有效:

  • 添加名为 HTTPS_PROXY 的环境变量,其值为 http://[domain][userid]:[password]@someproxy.mycorp.com:8080
  • Add an environment variable called HTTPS_PROXY with the value http://[domain][userid]:[password]@someproxy.mycorp.com:8080

以下操作无效:

  • HTTPS_PROXY 变量中省略用户 ID 和密码
  • 使用名为 HTTP_PROXY 的环境变量(无 S)
  • http.proxy 变量添加到全局配置文件 (.gitconfig)
  • https.proxy 变量添加到全局配置文件
  • 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

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

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

推荐答案

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

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>

如果您不想以明文形式存储密码,我会使用像 CNTLM 这样的本地代理转发器,它允许您引导所有流量通过它并可以存储散列的密码.

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天全站免登陆