Permission Denied Using Mercurial and SSH Keys

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 is configured to connect to a Mercurial repository over SSH, using SSH keys. When trying to connect to the repository Fisheye produces the following error message:

1 2 3 4 Exception executing command "hg clone -r 0 ssh://fisheye@localhost//hg/repository/usr/local/fecru-2.3.6/var/tmp/hg_test_clone_1286215449717 " Non-zero exit code: 255 abort: no suitable response from remote hg! com.atlassian.fisheye.plugins.scm.utils.process.ProcessException - Non-zero exit code: 255 Error talking to repository: remote: Permission denied, please try again. remote: Permission denied, please try again. remote: Permission denied (publickey,gssapi-with-mic,password). abort: no suitable response from remote hg!

Cause

This error will be thrown if the user running Fisheye doesn't have the SSH keys configured properly to access the remote Mercurial repository. For example, you may have configured the SSH keys for the fisheye user, but you may be running the Fisheye application as root.

Resolution

Please ensure that Fisheye is running as the user that has access to the SSH keys.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.