Mercurial VCS test errors with 'unknown protocol: ssh'

I am trying to get ssh with key auth working with Team City.

I have found some walkthroughs and I believe have covered the common issues: LocalSystem has the key cached, mercurial.ini is setup to use plink.exe and I've even tested 'hg clone' command from a CLI run as LocalSystem.

However, when I try to configure and test the VCS root in Team City it just hangs and the teamcity-vcs.log shows this error:

[2011-05-18 10:12:22,505]   WARN [on=editVcsRoot ] -      jetbrains.buildServer.VCS - Error while parsing url ssh:// unknown protocol: ssh
        at<init>(Unknown Source)
        at<init>(Unknown Source)
        at<init>(Unknown Source)
        at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.Settings.createURLWithCredentials(
        at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.Settings.getRepositoryUrl(
        at jetbrains.buildServer.buildTriggers.vcs.mercurial.command.IdentifyCommand.execute(
        at jetbrains.buildServer.buildTriggers.vcs.mercurial.MercurialVcsSupport$3.testConnection(

I have the following configuration settings:
HG Command path: 'c:\program files\mercurial\hg.exe'
Pull changes from: ssh://
Username: hg

Any insight appreciated, I can't find a single thing when I search for this error.


Comment actions Permalink

Sorry for double post but I resolved it and wanted to separate issue and answer.

I tried tweaking the URL some to see if different errors occurred, when capitalizing ssh to SSH the following error was logged:

[2011-05-18 11:02:36,911]   WARN [on=editVcsRoot ] -      jetbrains.buildServer.VCS - Error occurred in test connection
jetbrains.buildServer.vcs.VcsException: '"C:\Program Files\Mercurial\hg.exe" identify SSH://' command failed.
stderr: abort: repository SSH:// not found!

A close look at that error shows it wasn't passing the username into the hg command! So I went back and blanked out the username field and put the URL back into the state the hg command line expects: ssh://user@host/repository.

After this the test succeeded and I was able to continue.

Comment actions Permalink

And I cannot get it worked with latest stable TeamCity.

For "ssh://hg@ip/reponame" it just freezes with no messages to logs :-(

Comment actions Permalink


To communicate with Mercurial we call its command-line tool. Sometimes it asks for interactive input from the console, and TeamCity cannot handle such situations automatically. There is TW-18014 for this bug.
For example it can ask you for passphrase, or display some errors.

Please check that your key does not have a passphrase.
For troubleshooting purposes you can run TeamCity interactively within user session by

runAll.bat start

Comment actions Permalink

Thanks for the reply

There is no passphrase and actually I have solved the issue but I just cannot remember what I had done :-(

Comment actions Permalink

I have the same problem. I install first TeamCity 6.5.4 and it won't build simple project from Mercurial repo. Then I updated to 6.5.5 but problem stiil appered. In logs i found this lines:

[2011-11-02 16:06:14,093]   WARN [on=editVcsRoot ] -      jetbrains.buildServer.VCS - Error while parsing url ssh:// unknown protocol: ssh
     at<init>(Unknown Source)
     at<init>(Unknown Source)

Is it real to checkout from SSH?

Please sign in to leave a comment.