无法运行TortoiseGit + cntlm +代理服务器 [英] Unable to run TortoiseGit + cntlm + proxy server

查看:312
本文介绍了无法运行TortoiseGit + cntlm +代理服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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




以下是我到目前为止所尝试的内容:
我打开账户在GitHub上,然后我用putty生成了一个键:

I将私钥(2)保存在磁盘上,并将public(1)发送到SSH密钥的github位置:
然后我在克隆阶段使用私钥,如下所示:


这对我不起作用,所以我尝试使用)



您的%HOME%(在Windows上未默认定义)可以是任何路径,但它必须是 .ssh 的父目录,其中包含您的id_rsa.pub和id_rsa文件(您的公钥和私钥)在您的%HOME%中,您还需要一个 _ netrc 档案

  machine github.com 
登入loginGitHub
密码passwordGitHub

从那里开始,你可以克隆你的GitHub仓库:

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

要调试这些连接错误, GIT_CURL_VERBOSE = 1

<$ p $

code> git config --system http.sslcainfoC:\path\to\your\git\bin\curl-ca-bundle.crt
code>


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.

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

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:

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 !

解决方案

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"

这篇关于无法运行TortoiseGit + cntlm +代理服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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