"Permission denied" error occurs when performing git operations via SSH
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
Summary
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.
Solution
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.
Was this helpful?