开发者

How to configure hosted Mercurial in TeamCity 5

This is probably a simple problem and I'm feeling exceptionally dumb because I can't find a any kind of documentation.

I've just installed TeamCity 5 and开发者_运维知识库 I want to get files from my Mercurial hosting and there is two fields I just can't figure out.

HG Command path. What should I put here? The path to a file containing what? Can I get an example of that file somewhere? The host is using Mercurial over SSH where do I define my private key?

Pull changes from? Should I put the address I'm cloning from i.e. ssh://username@myhost.something/project


I figured this out for my TeamCity 5 server last week.

HG Command path: HG Pull changes from: https://bitbucket.org/.../.../

Don't put the username@ in the URL. This is specificed as in the Username/Password fields. If you include the username in the URL it'll fail as there is a bug in the configuration tool. You'll also see a screenshot of the configuration attached to the thread:

http://www.jetbrains.net/devnet/message/5254640#5254640

I'd suggest getting things working with HTTPS and then moving to SSH if possible. This breaks things down into two easier to solve configuration problems. I used the following tutorial to get SSH going on my Windows client machine.

http://www.codza.com/mercurial-with-ssh-setup-on-windows

I've not set this up on my TeamCity server yet. However I did get TeamCity to pick up my Mercurial.ini settings by putting the ini file in \Documents and Settings\TeamCity, which is the account the service runs under.


I've not used team city, but I think hg command path is probably the full path to your local mercurial executable. For me (on linux) that's:

$ type hg
hg is /usr/bin/hg

On windows it's where the 'hg' executable in your system path was placed by whichever (of the many) windows installers for mercurial you used.

Pull changes from sounds like the URL to the repo, so:

ssh://username@myhost.something/project

or

ssh://username@myhost.something//project  # note the _two_ double slashes

if you're using absolute paths on the server side.

Your private key location/specification depends on what you're using for ssh and whether or not you're running ssh-agent, but here's a links that explicitly points from within mercurial.ini, which seems sound:

http://dev.openttdcoop.org/projects/home/wiki/Configuring_TortoiseHg_(Windows)#Pointing-to-you-Private-key

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜