无法运行 TortoiseGit + cntlm +代理服务器

发布于 2024-12-03 07:15:18 字数 1352 浏览 1 评论 0原文

我正在尝试开始在 GitHub 上使用 Git。不幸的是,我无法让它工作,当我尝试克隆存储库时,我总是收到消息“连接被拒绝”。由于我位于代理服务器后面,我想问题就在那里,但我不知道如何解决。

在此处输入图像描述

下面是我迄今为止尝试过的: 我在 GitHub 上打开帐户,然后使用 putty gen 生成密钥: 在此处输入图像描述 我将私钥 (2) 保存在磁盘上,并将公钥 (1) 发送到 SSH 密钥的 github 位置: 在此处输入图像描述 然后我在克隆阶段使用私钥,如下所示: 在此处输入图像描述

这对我不起作用,所以我尝试使用我的代理进行身份验证 Cntlm 并将其设置为指向企业代理。 然后我更改了tortoisegit配置如下: 在此处输入图像描述

但是当我尝试克隆时,我总是遇到“连接被拒绝”错误。 Cntlm 配置文件如下所示:(

Username    fpollano
Domain      mydomain
PassLM          93D6A9F56CD43B4571101CC5806411F2
PassNT          5FD9AD7F1504A469D994241648972131
PassNTLMv2      7255AE1CBA2511A751F848FC34087011    
#Workstation    netbios_hostname    # Should be auto-guessed

Proxy       192.168.1.5:8080

我什至使用明文密码进行检查,结果相同)

有人知道解决方案吗?或者有什么方法可以让其中一些代理在某处记录某些内容? 感谢大家!

I'm tryng to start using Git on GitHub. Unfortunately I can't manage to get it working, I always receive, when I try to clone the repository, the message "Connection refused". Since I'm behind a proxy server I suppose the problem is there, but I don't know how to fix.

enter image description here

Below what I tryed so far:
I open the account on GitHub then I generated a key with putty gen:
enter image description here
I saved the private key (2) on the disk and sent the public(1) into the github place for SSH keys:
enter image description here
Then I used the private key in the clone phase as below:
enter image description here

This did not work for me, so I tryed to authenticate with my proxy using Cntlm
and setting it to point the enterprise proxy.
Then I changed the tortoisegit configuration as below:
enter image description here

but when I try to clone I'm always facing the "Connection Refused" error.
The Cntlm configuration file looks like:

Username    fpollano
Domain      mydomain
PassLM          93D6A9F56CD43B4571101CC5806411F2
PassNT          5FD9AD7F1504A469D994241648972131
PassNTLMv2      7255AE1CBA2511A751F848FC34087011    
#Workstation    netbios_hostname    # Should be auto-guessed

Proxy       192.168.1.5:8080

( I even check with clear password, with same results )

Anyone know a solution ? Alternatively any way to get some of these agents log something somewhere ?
Thanks to all !

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

情栀口红 2024-12-10 07:15:18

在 Windows 上,如果您在使用 https GitHub 地址进行任何拉/推之前定义了以下环境变量,将会有所帮助:

http_proxy="http://username:password@proxy:port/"
https_proxy="http://username:password@proxy:port/"
HOME=C:\Path\To\HOME

(http_proxy 小写

您的%HOME%(Windows 上默认未定义)可以是任何路径,但它必须是 .ssh 的父目录,其中包含 id_rsa.pub 和 id_rsa 文件(您的公共和私钥)

在您的 %HOME% 中,您还需要一个 _netrc 文件

machine github.com
login loginGitHub
password passwordGitHub

从那里,您将能够克隆您的 GitHub 存储库:

git clone https://github.com/Login/repo

要调试此类连接错误,设置GIT_CURL_VERBOSE= 1确保您的 CApath 正确

git config --system http.sslcainfo "C:\path\to\your\git\bin\curl-ca-bundle.crt"

On windows, it will help if you have the following environment variables defined before any pull/push using https GitHub address:

http_proxy="http://username:password@proxy:port/"
https_proxy="http://username:password@proxy:port/"
HOME=C:\Path\To\HOME

(http_proxy in lowercase)

Your %HOME% (which isn't defined by default on Windows) can be any path, but it must be the parent directory of your .ssh which contains your id_rsa.pub and id_rsa files (your public and private keys)

In your %HOME%, you will also need an _netrc file:

machine github.com
login loginGitHub
password passwordGitHub

From there, you will be able to clone your GitHub repo:

git clone https://github.com/Login/repo

To debug those kind of connection errors, set GIT_CURL_VERBOSE=1, and make sure your CApath is correct.

git config --system http.sslcainfo "C:\path\to\your\git\bin\curl-ca-bundle.crt"
雨的味道风的声音 2024-12-10 07:15:18

我有这个问题。我们的系统管理员强制互联网流量通过代理,我突然无法向 GitHub 推送/拉取。我尝试了 VonC 的答案,但没有成功。幸运的是,我们的系统管理员将 github.com 列入了防火墙白名单,我又恢复了正常工作。所以问一下也没什么坏处。 :)

I had this issue. Our Sys admin forced Internet traffic to go through a proxy and I was suddenly unable to push/pull to/from GitHub. I tried VonC's answer with no luck. Fortunately our Sys Admin whitelisted github.com on the Firewall and I was back in business. So it doesn't hurt to ask. :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文