8

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

控制台显示如下:

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

我还运行wireshark 来监控流量。令我惊讶的是,流量直接转移到了 bitbucket。我认为它应该首先将数据包发送到代理服务器。是不是意味着我的代理服务器没有生效?我该怎么做才能让它生效?

4

2 回答 2

4

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

[http_proxy]
host = aproxy.somedomain.com:1234

检查它是否存在。也许它没有正确保存?

我如上所述做了一个假条目并尝试拉动并立即连接到代理失败。

于 2012-08-21T04:04:30.747 回答
3

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

(1) http://d.hatena.ne.jp/falkenhagen/20091007/1254909363

(2) http://www.jameswampler.com/2010/06/10/configure-mercurial-hg-to-use-a-proxy-server/

从第二个链接,他说:

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

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

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

于 2014-11-07T00:57:54.607 回答