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

Still need help?

The Atlassian Community is here for you.

Ask the community

This Knowledge Base article was written specifically for the Atlassian Server platform. Due to the Restricted functions in Atlassian Cloud apps, the contents of this article cannot be applied to Atlassian Cloud applications.

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 an RSA public key instead of a DSA public key.


Last modified on Apr 17, 2018

Was this helpful?

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