Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Mercurial 如何使Windows中的代理服务器设置对tortoisehg生效?_Mercurial_Tortoisehg - Fatal编程技术网

Mercurial 如何使Windows中的代理服务器设置对tortoisehg生效?

Mercurial 如何使Windows中的代理服务器设置对tortoisehg生效?,mercurial,tortoisehg,Mercurial,Tortoisehg,我在Windows中为我的tortoisehg设置了“全局设置”中的代理服务器。当我尝试连接到bitbucket存储库时,由tortoisehg生成的命令行是hgclone--debug--http://bitbucket.org/ 控制台显示如下: using http://bitbucket.org/<path to repo> proxying through http://172.19.6.47:8080 http auth: user <username>, p

我在Windows中为我的tortoisehg设置了“全局设置”中的代理服务器。当我尝试连接到bitbucket存储库时,由tortoisehg生成的命令行是
hgclone--debug--http://bitbucket.org/

控制台显示如下:

using http://bitbucket.org/<path to repo>
proxying through http://172.19.6.47:8080
http auth: user <username>, password not set
sending capabilities command
使用http://bitbucket.org/
代理通过http://172.19.6.47:8080
http身份验证:用户,未设置密码
发送能力命令

我还运行wireshark来监控流量。令我惊讶的是,流量被直接传输到bitbucket。我认为它应该首先将数据包发送到代理服务器。这是否意味着我的代理服务器不生效?如何使其生效?

您的
mercurial.ini
文件应该有这样一个部分:

[http_proxy]
host = aproxy.somedomain.com:1234
检查它是否存在。也许它保存得不正确


我做了一个如上所述的假条目,并尝试拉拽,但立即无法连接到代理。

以下两个网页有一个正确答案

(一)

(二)

从第二个环节,他说:

我的笔记本电脑大部分时间都在公司防火墙后面,因此无法对bitbucket.org执行hg推拉操作,因为它没有命中或代理服务器。要将Mercurial设置为使用代理服务器,请在存储库的.hg文件夹中编辑hrgc文件,并添加以下部分:

[http_proxy]
host = foo.bar:8000
passwd = password
user = username

只需将值更改为代理服务器主机名和端口、用户名和密码。

我使用Ortoisehg GUI编辑了该文件,并在阅读生成的
mercurial.ini
后确认结果正确。但我清楚地看到TCP SYN被直接发送到bitbucket,而我的代理设置被忽略。当然,我看到了一个超时错误(
urleror:[Errno 10060]
),因为我没有直接的互联网连接。你在窗户上用乌龟吗?您使用的是哪个版本的mercurial?我在Windows上使用的是最新的TortoiseHg 2.4.2。虽然此链接可能会回答这个问题,但最好在此处包含答案的基本部分,并提供链接以供参考。如果链接页面发生更改,仅链接的答案可能无效。-@DamianKozlak,我修改了答案,请检查一下。很好,好多了。