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

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

I cannot clone my own repository



I cannot clone my repository. I have my SSH keys associated with my account but It tells me:


Cloning into 'devops'... Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I am the admin of this repository.


When I try to clone the repository with HTTPS I got this:


Cloning into 'devops'...
remote: Invalid username or password
fatal: Authentication failed for ''


I've tried with my user and my email, but It does not work.

I don't understand what's happening.

My SSH key is associated with my account, and I have a unique key. (I don't need .ssh/config) file.

2 answers

1 vote

Hi Álvaro and welcome to the community.

For the issue with SSH, could you please run the following command on the machine you are trying to clone from, and attach the full output here?

ssh -Tvvv

This will give more verbose output and very possibly an indication on what may be going wrong with SSH authentication. Please feel free to sanitize in the output your Bitbucket username (in case authentication succeeds and it shows there), or the local paths to your ssh key and known_hosts that show in the output, if you don't want them to be publicly visible.

Regarding HTTPS authentication, are you cloning from a command line tool or a Git GUI client?

1) If you're using a Git GUI client, I would suggest checking if there are any credentials stored for and clear them.
2) Double check if you can log in with your password in via browser. Just a note here, that logging in from browser requires an email, but when cloning/pulling/pushing via HTTPS, you should use your Bitbucket username.
3) I see that the HTTPS URL of the repo in the output doesn't include a username (not sure if you removed it from the output or if it was not included in the clone URL at all). Do you get asked for a username and password when you try to clone via HTTPS?

Kind regards,

Info updated in my answer.

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,706 views 10 16
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