"Permission denied" error occurs when performing git operations via SSH

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Problem

When using SSH to perform git operations on a repository hosted on Bitbucket Server, seemingly randomly the operation may fail with the following error:

Permission denied (publickey)

A similar error is written to the log at the same time.

Diagnosis

Environment

  • Any version of Bitbucket Server
  • A DSA public key is used for authentication (rather than an RSA key)

Cause

While Bitbucket Server supports DSA public keys, this issue is known to occur when using keys of this type. The root cause is not known at this time.

Resolution

To resolve this problem, use a different public key instead of a DSA public key. To generate a key, it's recommended that you consult the documentation for the usual software that your team uses for SSH key generation.

More information on this topic on the SSH-RSA key rejected with message "no mutual signature algorithm" document.



Last modified on Aug 31, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.