Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Connecting TeamCity VCS Root with a GitHub repository using a private key

I been trying for about three hours to create a VCS Root pointing to a Github repository using "Private Key" as the the Authentication method.

enter image description here

But when I hit the "Test Connection" button I get this error back:

List remote refs failed: com.jcraft.jsch.JSchException: invalid privatekey: C:\Users\Administrator.ssh\EC2BuildServerPrivateKey.ppk

The private key definitely exists, and I've even cloned the repository using this same key using GIT extensions.

Surely I'm not the first one to try and use github as a VCS root!? I'm using Team City 7.1.3!

Can anyone please please help with some suggestions of things to verify?

Maybe I should be using some other "Authentication method" as this one doesn't work?

like image 266
Andrew Duffy Avatar asked Jan 03 '13 09:01

Andrew Duffy


People also ask

How do I connect TeamCity to GitHub?

Integrating TeamCity with GitHubcreate a project from GitHub URL. create a VCS root from URL. create a Git VCS root. integrate with a GitHub issue tracker.


1 Answers

I'm pretty confident that TeamCity requires an OpenSSH private key and won't work with a private key in PuTTY Private Key format (.ppk).

You can convert your private key using the PuTTY Key Generator GUI that ships with PuTTY.

like image 69
Jonathon Rossi Avatar answered Sep 19 '22 11:09

Jonathon Rossi