Setting up GitHub with TeamCity


I'm having problems creating a VCS root for GitHub

I have created a private key as described here:

With all the default settings, no passphrase.

These are the TeamCity settings I'm trying:

Fetch URL:{mycompany}/{myproj}.git
Push URL: blank

Auth Settings:
Method: Private Key
User name: {my git hub username}
Private Key Path: C:\Documents and Settings\builder\.ssh\
Passphrase: blank

When I click 'Test Connection', I get the following error:

'{mygithubusername}{companyname}/{projectname}.git': Unable to load identity file: C:\Documents and Settings\builder\.ssh\

I've tried deleting the SSH keypair and trying one with a passphrase instead (and typing it in the appropriate settings box), but that doesn't work either.

I can successfully authenticate with with GitHub via Git Bash (as described in the instructions I linked to).

I have set up TeamCity services to run as an administrative user - not the system account.

I've turned on VCS debugging - trace is below.

Many thanks,

Comment actions Permalink

If you use the git.<x> address then you are telling the system to use your SSH key - if this is not setup on your CI server then you will get the issues as you have done. The workaround for this is to change the url from git.<x> to https://<url>.git

this will then allow the system to work

I have my auth settings on Password not private key and its working eprfectly - hope this helps


Comment actions Permalink

Used the password as you suggested. Now works. Thanks Paul.

Comment actions Permalink

Has anyone successful gotten the following combination to work?

  • Git
  • GitHub repo using<user>/<repo>.git syntax
  • Agent side checkout
  • SSH Key with a passphrase
  • Authentication Method: "Default Private Key"

Please sign in to leave a comment.