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

Adding a second ssh key

Ben Goldenberg April 12, 2023

Hi,

I followed the documentation https://blog.developer.atlassian.com/different-ssh-keys-multiple-bitbucket-accounts/ 

I have a created a second ssh key in my .ssh folder and updated config file to look like this: 

 

Host *

UseKeychain yes

 

#user2 account

Host bitbucket.org-bestcare

HostName bitbucket.org

User ben-pc

IdentityFile ~/.ssh/bestcare

IdentitiesOnly yes

 

my github project have the following remote:

origin git@bitbucket.org-bestcare:workspace-id/repo.git

 

It seems to me I have set up everything but still get access denied.

 

 

 

2 answers

1 accepted

0 votes
Answer accepted
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 14, 2023

Hi @Ben Goldenberg and welcome to the community!

The public SSH key that you generated needs to be added to the public keys of the Bitbucket account that has access to this repo. I checked our system and your Bitbucket Cloud account with the same email as your community account, doesn't have any SSH keys associated with it.

Can you please log in to this account and then add the public key on this page https://bitbucket.org/account/settings/ssh-keys/ ?

Afterwards, try again the Git operation that was giving you an error.

If you are still experiencing issues, can you please try the operation using the following command and then attach the command and full output here?

GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" <git command>

replace <git command> with the git command that is giving you an error.

Please make sure to sanitize any private/sensitive data from the output, prior to sharing.

If you have any questions, please feel free to let me know!

Just a heads up, I removed the repo URL from your post to comply with our privacy policy.

Kind regards,
Theodora

Ben Goldenberg April 18, 2023

Thanks

Ben Goldenberg April 18, 2023

Working now

Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 19, 2023

Hi Ben,

That's good to hear, thank you for the update!

Please feel free to reach out if you ever need anything else.

Kind regards,
Theodora

0 votes
Ben Goldenberg May 6, 2023

Hi,

 

It is stopped working again.

Can you help ?

Ben

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events