5

Does anyone know of a tutorial for using TeamCity with github with ssh private keys. I have tried to set up git hub to connect and I either get a authentication error or get access denied. I am running TeamCity on Windows 2003. I am running the build agent as a custom account. I am running the web server under the administrator account. I have create a key for the custom account and administrator account. I now get an error that:

The connection test failed: com.jcraft.jsch.JSchException: java.io.FileNotFoundException: C:\Documents and Settings\Administrator.ssh (Access is denied)

If anyone has successfully set this up please help. I am going on 3 hours into this and want to get it solved.

Thanks.

2 Answers 2

6

The following VCS Root configuration works for me:

  • Clone URL: [email protected]:username/repository.git
  • Clone repository to: C:\somepath
  • User Name Style: UserId (jsmith)
  • Authentication Method: Private Key
  • Private Key Path: C:\SSH\myKeyFile.priv
  • Passphrase: only if key file is secured with a passphrase
3
  • 2
    This works for me as well, however if you want to do an agent-based checkout, you need to use the "Default private key" instead of a private key path. I haven't been able to get that working yet (on windows). Any ideas? Doesn't seem to honor my ~/.ssh/config file at all.
    – Tom Lianza
    Oct 4, 2010 at 21:44
  • 1
    Found it... I needed to specify a wildcard for the hostname, so my file looks like this: Host * IdentityFile ~/.ssh/toms_desktop_id_rsa
    – Tom Lianza
    Oct 4, 2010 at 22:51
  • when using private key to authenticate I did not need to add my username at all Mar 23, 2017 at 2:25
1

if you haven't figured this out yet...

this config worked out for me

Authentication Method: Default Private Key

UserName: (blank)

Known Hosts Database <<-- CHECK IT!

thats what finally worked after a couple of hours trying to get it to work :)

1
  • 1
    what do you mean by "check it" next to the known hosts database?
    – tofutim
    Jul 8, 2016 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.