Setting up GitHub with TeamCity

Hi,

I'm having problems creating a VCS root for GitHub

I have created a private key as described here:  http://help.github.com/win-set-up-git/

With all the default settings, no passphrase.

These are the TeamCity settings I'm trying:

Fetch URL: git@github.com:{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\id_rsa.pub
Passphrase: blank

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

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

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,



Attachment(s):
teamcity-vcs.log.zip
3 comments
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

Paul

0
Comment actions Permalink

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

0
Comment actions Permalink

Has anyone successful gotten the following combination to work?

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

Please sign in to leave a comment.