Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I add an SSH key as opposed to a deployment keys

Niklas Rudemo August 29, 2016

This question is in reference to Atlassian Documentation: Set up SSH for Git

I am trying to set up ssh keys for bitbucket, using this guide:

https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html

In step 4.5, I am asked to input the SSH key. However, it describes how to input Deployment keys, which are read only. The page unhelpfully notes that:

"

Deployment keys

Use deployment keys to gain read-only access to this repository. Learn more about using SSH keys."

However, if you follow the link to "using SSH keys" you get back to the same guide that lead you to the deployment keys in the first place. So my question is simply: exactly where in Bitbucket do I enter the SSH key? The guide only says "Back in your browser", but provides no URL.

9 answers

29 votes
AlejoCocolina August 22, 2017

Basically, you should add your keys to your profile, not to a project.

Atlassian's UX has always been "pretty but cryptic".

This is a prime example where UX, documentation and even the forum fail.

In every case they assume you know what they know. Actually I dont think they are aware of what the confusion is.

This mostly happens to first time users who do not set up an rsa key in their profile right away.  Then, when set up their first project the tutorials send them looking for something with the word "Keys" in the interface. They find it first in the screen they are working with: the project's screen.

So,  put your Key here:

Screen Shot 2017-08-22 at 2.07.55 PM.png

 

NOT HERE... in your project:

Screen Shot 2017-08-22 at 2.11.59 PM.png

jwollaston December 12, 2017

+1

keira25 January 5, 2018

Thank you!

matthewkyleung January 6, 2018

Thanks!

Brennan Basinger January 18, 2018

Yes! Thank you!

Allan Daly February 2, 2018

You rock. Super helpful. Thank you!

Brian Keane March 22, 2018

Extremely helpful.  Thanks a lot!

Lorie Anne Castillano June 4, 2018

Hello everyone! Is there other way for this? Still getting the error after I added the ssh key of the server pulling the repo. thank you so much

Like # people like this
jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 4, 2018

You first need to remove the access key from any repository where it is installed. Once that is done, add the key to your user account (as displayed in the first image above).

airespt June 27, 2018

I've fallen for this trap too.

Allow me to point out that even after setting BitBucket account SSH key, I still had project SSH key present and this was taking precedence.

Even after removing the project key I still got the 'read-only access' error.

I had to go into GitKraken authentications and disconnect/reconnect to BitBucket to finally Push with success.

Like rendrap likes this
Sonia Wu August 6, 2018

This is DAMN helpful! Btw, any one knows what the deployment key is for?

Like SL5 likes this
Armando Duran August 30, 2018

This did for me! ... Thank you!!

mvec December 10, 2018

Great! Thank you.

Aidin Hassanzadeh December 14, 2018

You made my day!

acambitsis December 16, 2018

@AlejoCocolina dude your post was a life saviour, even a year and a half later.  Feel exactly into the trap that you speak of, and after 3 hours of chasing rabbit holes due to misleading articles, did I come across the gem of your post.  Thank you.

Don Blaskowsky February 25, 2019

YOU SIR, are my HERO FOR THE DAY!!  After screwing around with this for two days, finally an answer that makes sense.  I deleted the current account SSH key, deleted all the access keys for all the repos, rebuilt the account SSH key and I am suddenly back in business!!

Thank you so much!!

SL5 March 28, 2019

this feature is only available to hosted server users. right?

Omar Posada June 17, 2019

@AlejoCocolina thank you so much!!! After several struggling days we started to think literrally out of the box (the console) and tried several approaches (tried unsuccessfully to separate managed account, regenerate SSH keys, you mention). We found a patch solution (app passwords) but yours is THE solution.

We can return to happy coding!

kzherdev September 7, 2019

Thank you very much!

1 vote
niklasrudemo August 29, 2016

As I said in my original question, I do get to that point, and all it says is that I should input the SSH key  "Back in your browser". The problem is that no URL is provided, and the only obvious place "back in the browser" is the place where you input read-only deployment key, which brings me back to where the problems started. All I need is the URL for the place to put the non-deployment key.

abhin-atl
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 29, 2016
1 vote
Niklas Rudemo August 29, 2016

To clarify, when I try to do a git push, I get this error, which is due to the fact that I am using a read-only deployment key:

conq: repository access denied. access via a deployment key is read-only.

 

0 votes
outstandingpet May 7, 2019

MY GOD.  THANK YOU.

0 votes
Mike Flores February 18, 2019

+ 1 Million. Thank you!

0 votes
Aravind Nanjundaswamy February 15, 2019

Thanks - that helped :)

0 votes
lucasnavigatetravel September 6, 2018

Awesome! BUT:

 

And if I want to give permission only in SPECIFIC Repository for one given SSH KEY? 

0 votes
Gaurav Kapil (Gk) March 2, 2018

Awesome.... +1

0 votes
abhin-atl
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 29, 2016

On that document that you linked above (https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html), if you expand the Collapsed "Set up SSH for Windows" or "Set up SSH for Mac OS/Linux" you should be able to see the step where you upload your public key to Bitbucket. The section should be called "Install the public key on your Bitbucket account".

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events