如何在代理后面克隆Codeplex Merurial存储库? [英] How to clone a codeplex mercurial repository behind a proxy?

查看:81
本文介绍了如何在代理后面克隆Codeplex Merurial存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用TortoiseHG版本2.4.2,并且使用Firefox或Internet Explorer,我都可以很好地浏览以下Codeplex项目.

I am using TortoiseHG version 2.4.2 and with either firefox or internet explorer I can browse the following codeplex project just fine.

https://hg.codeplex.com/oxyplot

问题是我无法在本地计算机上克隆存储库.最初,我曾经遇到过这样的错误,

The problem is that I cannot clone the repository on my local computer. Initially, I used to get errors like this,

URLError:[Errno 10061]无法建立连接,因为目标计算机主动拒绝了该连接

URLError: [Errno 10061] No connection could be made because the target machine actively refused it

后来有一些google-fu(后来的HOURS),我发现我需要为tortoiseHg设置代理设置,这很烦人的是不使用默认的Windows设置. 此问题有所帮助为我指明正确的方向.这是我遵循的步骤,

Some google-fu later (HOURS later), I figured out that I needed to set proxy settings for tortoiseHg, which annoyingly enough doesn't use the default windows settings. This question helped point me in the right direction. Here are the steps that I followed,

  1. 打开TortoiseHg工作台
  2. 选择文件>设置
  3. 按下右上角的编辑文件"按钮以打开文件编辑器

在文件中,我添加了以下几行

And in the file I added these lines,

[http_proxy]
host = 111.11.11.11:80
user = xxxxxxx
passwd = xxxxxxx

(出于明显的原因未显示实际值)

(Actual values are not shown for obvious reasons)

现在,当我尝试使用上述链接克隆存储库时,出现此错误,

Now when I try to clone the repository with the above link I get THIS error,

SSL错误:未知协议

SSL error: unknown protocol

我现在开始沮丧地把头发扯掉!有人知道我下一步该怎么做吗?搜寻该问题会产生一些链接,其中涉及到位桶,超时...等等-对我来说是希腊语和拉丁语.

I am beginning to tear my hair out in frustration now! Does anyone know what I'm suppossed to do next? Googling the issue produces links which talk about bitbucket, timeouts ... etc - Greek and Latin to me.

我睡过这个问题,唯一意识到的是代理是非常自定义的事情.不过,如果有人有我可以尝试的任何提示/指示,我们将不胜感激.对于它的价值,我使用Visual Studio 2010作为我的IDE.我可以从那里尝试什么吗?

EDIT 1: I slept over the issue and the only thing I realize is that proxies are very custom things. Still, if anyone has any hints/directions I could try, it would be VERY appreciated. For what it's worth, I'm using Visual Studio 2010 as my IDE. Anything I could try from in there?

推荐答案

令人惊讶的是,Visual Studio 2010 Professional是我一直在寻找的答案.或者,VS2010 + HgSccPackage 扩展名.对于那些不知道HgScc是VS的扩展程序的人,它提供了对Mercurial的原生支持.

Amazingly enough, Visual Studio 2010 Professional was the answer I was looking for. Or rather, VS2010 + HgSccPackage extension. For those who don't know HgScc is an extension for VS that gives it native Mercurial support.

让我烦恼的是,我可以使用Web浏览器浏览Mercurial存储库,但不能用TortoiseHG克隆它.将问题的早期更新发布后,我一时兴起,只是尝试浏览VS2010中的存储库.出乎意料的是,我能够做到!好吧,那为什么不尝试直接从IDE克隆存储库呢?因此,我做到了,奇迹产生了奇迹! :)

Something that kept bugging me was that I could browse the mercurial repository using my web browser, but NOT clone it with TortoiseHG. After I posted my earlier update to the question, on a whim I just tried browsing the repo from VS2010. Surprisingly enough, I was able to! Well, then why not try and clone the repo straight from the IDE then? So I did, and wonder of wonders, it worked! :)

没有麻烦的代理设置或任何废话.安装扩展程序后,从菜单栏中选择

No bothersome proxy settings or any of that nonsense. After the extension is installed, from the menu bar select,

Mercurial>克隆

Mercurial > Clone

在这些选项中,我按照Codeplex的说明粘贴了项目的源路径,填写了我的Codeplex授权信息,最后粘贴了要将项目复制到的目标位置.

In the options there I just pasted the source path to the project as depicted by Codeplex, filled in my Codeplex authorization info and finally the destination where I wanted the project copied to.

成功了!

事后看来,我确定这样做的原因是因为hgscc扩展使用默认的VS2010(或更确切地说是Internet Explorer)连接选项,而不是tortoiseHg拥有.这意味着VisualHG扩展会失败,因为它只是tortoiseHg的包装.我尚未对此进行测试,但是如果有人这样做,您能发表评论吗?

In hindsight, I'm certain that the reason why this worked is because the hgscc extension uses the default VS2010 (or rather Internet Explorer) connection options and not it's own as tortoiseHg does. Which implies that the VisualHG extension would fail as it's just a wrapper around tortoiseHg to begin with. I haven't tested this, but if anyone does, could you leave a comment?

这篇关于如何在代理后面克隆Codeplex Merurial存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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