It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bitbucket 'repository access denied'

Whenever I reboot my machine, I have to create a new SSH key because the previous one doesn't work. I validate that the public key file lines up with the one in my BitBucket settings, I've run `ssh -Tv` and found that I was able to log in with no problem, but whenever I run any kind of command to the repository it gives me `repository access denied`. I have confirmed that my permissions are set up correctly.

As far as I know I am doing everything correctly on my part, but the only way to get it to work again is to set up a brand new SSH key  - which will then stop being accepted whenever my machine reboots.

1 answer

0 votes
Sauce Atlassian Team Mar 13, 2018

Hey Alan, What's the client machine? Windows, Mac or Linux?  Are you using a client or is normal command line? The last question I have is if you are using Server or Cloud?

This should help me provide a better answer.



Using Git Bash on a Windows machine. I am connecting to a BitBucket remote, so I guess cloud would be the answer to the last question?

Sauce Atlassian Team Apr 17, 2018

Hey Alan, So I have seen issues like this before. So what you have to know is that there are different ENV's on your Windows machine. 



  • Local Windows Machine 
  • Putty Shell
  • Git Client

Check out the following KB:

As you can see, Sourcetree, Git Bash, Putty and the OS all store the keys in different places. I would use the above KB to make sure you are creating the key correctly.


You can use config files to point to the private key from all of the above clients too. Here is a good resource for ssh config file:

Like Prashant Chaudhari likes this

Ah, so it seems the configuration was the culprit. I had an IdentityFile entry for which was pointing to the standard format keyfile (stored at ~/.ssh/bitbucket_rsa) but PuTTy uses its own format (stored at ~/.ssh/bitbucket_rsa.ppk). I presume that when it tried to connect, it was expecting to use the wrong file. After I deleted that entry from the config file, I was able to connect again.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Atlassian supported Jenkins integration for Bitbucket Server

We’ve been building a plugin to integrate Bitbucket Server and Jenkins CI, and I’m excited to announce that our alpha is ready to download and install. It lets you seamlessly configure a Jenkins job ...

497 views 0 10
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you