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

I generated my ssh keys and added it to my account but i am not able to access my git through ssh

Varun Narayanan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 3, 2023

I added my public key in my user settings but still i am unable to clone my repositories

1 answer

1 accepted

0 votes
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 4, 2023

Hello @Varun Narayanan ,

Welcome to the Atlassian Community!

After setting up the SSH on the bitbucket side, you also need to ensure that the correct key is being used by your local system by Adding your key to the ssh-agent .

If you have already done that, we will need more details about the error you are facing to investigate further. 

In this case, could you please try cloning the repository with the command below and share with us the full output ? 

GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git clone git@bitbucket.org:<workspace>/<repository>.git

This command will include verbose logs that will have more information about what ssh keys are being tried so we can confirm if your local configuration is correct. Please make sure to sanitize any personal/private information when sharing the logs here (such as username, repository name, workspace name, etc) as this is a public forum.

Thank you, @Varun Narayanan !

Patrik S

Varun Narayanan
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 7, 2023

I resolved the issue by configuring my config file

my now config file looks like this ,

Host bitbucket.org
Hostname bitbucket.com
IdentityFile ~/.ssh/your_privatekey

by adding these lines in my config file solved the issue . 

Like Patrik S likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events