How to clone a codeplex mercurial repository behind a proxy?

冷暖自知 提交于 2019-12-20 03:45:06

问题


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] No connection could be made because the target machine actively refused it

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. Open up the TortoiseHg Workbench
  2. Select File > Settings
  3. Press button 'Edit File' near the top-right to open file editor

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 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.

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?


回答1:


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.

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 > Clone

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.

It worked!

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?



来源:https://stackoverflow.com/questions/11449133/how-to-clone-a-codeplex-mercurial-repository-behind-a-proxy

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!