GitHub connection timed out when using SSH key

Hi,

We have TeamCity Professional 2018.2.1 (build 61078) installed on a machine in AWS cloud and we are connecting to a github private repository using SSH keys.

The generated keys were uploaded successfully into TeamCity and used when setting up a VCS root (the fetch url is the one starting with git@github, username is left blank). Keys have been added into the GitHub account too.

We have tried keys with and without passphrases, 2048 bits and 4096 bits, PEM format, all generated using ssh-keygen in git bash.

When we click the Test connection button in the VCS root screen we are getting the connection success message, but after a while we get these kind of messages (the github url shown is not the real one):

Failed for the root '"GitHub DMZ" {instance id=307, parent internal id=69, parent id=Service_GitHubDmz, description: "git@github.com:company/service.git#refs/heads/master"}: List remote refs failed: org.eclipse.jgit.errors.TransportException: git@github.com:company/service.git: Connection timed out: connect

These exceptions appear and disappear, but we can build the projects without issues (unless we just got a timeout). 

We have no problems when we authenticate using username/password.

Could these problems be related to the fact that the TeamCity instance is installed on a EC2 machine in AWS?

 

Thanks,

Constantin

 

 

0
1 comment

Hi Constantin,

 

It's unlikely that the issue comes explicitly from being on EC2, but it might be a side cause. First, it would be useful to understand whether the issue is happening on the remote server or on the TeamCity agent or server, then whether it's server, agent or both, to isolate the machine with the issues. Then, it would also be helpful to know whether the same issue happens if the server (or the agent, if it's the part failing) fails from a local machine instead of EC2.

 

Otherwise, EC2 in AWS should work just fine, make sure that both servers have enough resources, and if you have a large amount of VCS Roots try to reduce the amount parametrizing or unifying VCS Root instances.

 

If the issue still happens and you can trace it to TeamCity, please collect the teamcity-vcs.log from the failing part (server or agent) and send it to us via the "Submit a request" button on top of this page.

0

Please sign in to leave a comment.