SSH Error Talking to Repository When Hosted on GForge

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

Fisheye & Crucible are unable to authenticate over SSH using key-based authentication when the repository is hosted on GForge. The below message will be displayed after clicking the Test Connection in the UI.

1 2 3 4 5 6 7 8 Error testing connection. Error talking to repository: at com.atlassian.fisheye.git.GitScmConfig.testConnection(GitScmConfig.java:148) at com.cenqua.fisheye.RepositoryConfig.testConnection(RepositoryConfig.java:441) at com.atlassian.fisheye.spi.admin.impl.DefaultRepositoryAdminService.testConnectionFor(DefaultRepositoryAdminService.java:682) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) Connection failed.

Cause

This is caused by GForge not working with public keys that have a comment. A comment in the public key is anything after the == at the end of the file. An example public SSH key with a comment is below.

1 ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3eahbupC1asdfasdfTioBnRFwiO39OpsdmN9BaFDSDj5OAWGZ9Qyn327Bfu1K5rFdDsPOit69FLPaQDFSADfMJkYnBIDDOrue/GQXOIJnkiuUH9ls67uPdK7ca2Q2J2MNJUJSbPZA7FwrOiejnL6gLOT6V2hTy6Hjl8L7s3KrFJgZnKX8YcujErHHqBw8d9PIak9PfafcvUBwbkRrYHun967lbJ+HJpaEuXkSWuRkWyGpBAaOMx1tQVAbwNLbPJib/i+QlQIf9DR6GQRIVQX8NJB/KH30cyfg1YoVhmCVb5xgh8irBsJkRux83owC9==comment text here

Resolution

  • Remove the comment text from the public key that is uploaded to GForge.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.