Missed Team ’24? Catch up on announcements here.

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

I cannot clone my own repository

Álvaro Castillo
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!
February 22, 2021

Hi,

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

```

Cloning into 'devops'...
git@bitbucket.org: 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 'https://bitbucket.org/xxx/devops/'

```

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
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 22, 2021

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 git@bitbucket.org

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 bitbucket.org and clear them.
2) Double check if you can log in with your password in https://bitbucket.org/ 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,
Theodora

0 votes
Álvaro Castillo
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!
February 22, 2021

Info updated in my answer.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events