Can't authenticate with Bitbucket Server despite successful public key storage
Asked by Piyush_Wadhwani:

I am facing issue setting up integration between Bamboo and Bitbucket

I am able to access Bitbucket repository using ssh through local git client using public/private keys

i have linked two application using outh

bit bucket and bamboo both are running on same server but different port

Bitbucket

<http://localhost:7990>

SSH enabled

SSH Port : 7999

SSH base URL <ssh://localhost:7999>

Bitbucket has public key set

Bamboo

[http://localhost:7085/](http://localhost:7085/admin/administer.action)

Shared Credential SSH which is added in BitBucket

Bitbucket is linked

When i am adding linked repository

i am getting following error

bamboo1.jpg

2016-03-22 14:25:28,407 INFO \[http-nio-7085-exec-8\] \[AccessLogFilter\] piyush POST <http://localhost:7085/admin/createGlobalRepository.action> 107089kb  
2016-03-22 14:25:31,529 INFO \[http-nio-7085-exec-8\] \[StashRepository\] Public key was added to Bitbucket Server (Bamboo user: piyush, application: Bitbucket \[<http://localhost:7990>\], location: repository BRM/brm): ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCbZra9jfb0hZnxFjiu0Ysdx+lTI/pV51wP3l5a9a1bPxO7txSBV2A6VFTqjnXHPvqNdPeiUhRwz2B2kunmrA4qrNtFdlX1wvAta9UxgEE3hd0Di6ZqGnJST2y/KY7k4Xvnpstp6yOdWf362x7RLzeVPo1/yiliQr0BlO46O18IfiAhKPy8YEPPG725JPgkDw2tK+AsAoKBLTrWd3OnCTMiq7rcpU1EqD3Pu7o2HqQTwoqhUG3M/t86r/neMnTtm/HYAWRu23pKG5peNotCVZBThHTl0UCsu9hSlyiXWViACefzm8FvaXYRZSE9wKuX1vW2zhkKVphJJmwHh85LeQ2N <http://localhost:7085>  
2016-03-22 14:25:32,093 INFO \[http-nio-7085-exec-8\] \[StashRepository\] Can't authenticate with Bitbucket Server despite successful public key storage: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCbZra9jfb0hZnxFjiu0Ysdx+lTI/pV51wP3l5a9a1bPxO7txSBV2A6VFTqjnXHPvqNdPeiUhRwz2B2kunmrA4qrNtFdlX1wvAta9UxgEE3hd0Di6ZqGnJST2y/KY7k4Xvnpstp6yOdWf362x7RLzeVPo1/yiliQr0BlO46O18IfiAhKPy8YEPPG725JPgkDw2tK+AsAoKBLTrWd3OnCTMiq7rcpU1EqD3Pu7o2HqQTwoqhUG3M/t86r/neMnTtm/HYAWRu23pKG5peNotCVZBThHTl0UCsu9hSlyiXWViACefzm8FvaXYRZSE9wKuX1vW2zhkKVphJJmwHh85LeQ2N <http://localhost:7085>  

i can see access key being added in Bitbucket repository

[](https://community.atlassian.com/t5/Bamboo-questions/Can-t-authenticate-with-Bitbucket-Server-despite-successful/qaq-p/238449?attachment-id=6513){#link_116770dfd967c0}  
[](/tnckb94959/attachments/tnckb94959/bamboo-questions/7550/1/bamboo1.jpg){#display_116770dfd967c0_0}


Answers:
author: Christian Schlaefcke
body: Maybe this helps:

<https://confluence.atlassian.com/bamkb/new-access-key-is-required-but-could-not-be-added-to-bitbucket-server-808616180.html>

comments: author: Christian Schlaefcke
body: In my case it was a missing openssh-client on a CentOs 8.1 based Docker image by the way ;-)

Here you can find how to install if you run into the same issue:

<https://linuxhint.com/enable_ssh_centos8/>


author: Anil Unnikrishnan
body: Facing the same issue.


author: Jurgen Schober
body: 2019...and I am having this issue. Did anyone resolve this?


author: Pawe? Pawlak
body: The issue is still on Bamboo 6.7 :/


author: Jared Lesser
body: Anyone else able to resolve this issue? I am experiencing the same thing...


author: ksondere
body: I'm having the same issue. I have JIRA Bamboo and Bitbucket all linked


author: Piyush_Wadhwani
body: if you have integrated JIRA , Bitbucket and Bamboo then make sure JIRA is also up


author: Piyush_Wadhwani
body: i never got answer to this problem. i believe this issue was resolved by making sure JIRA is up and running while you are doing this step. during user creation i used the option to use JIRA as user management


author: Gail Stewart
body: Did you ever get an answer to this question? I have the same problem.


Tags: bamboo-administration