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

I've just created a repo in my account and I can't push

Osvaldo - Greenpeace España December 6, 2017

I've just created a repo in my account and I can't push

I can push to my other Bitbucket repositories and I can pull from other private repositories I have access to but I can't push to this one.

 

Cloning into 'wpdoctest'...

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

 

Adding it as remote does not work either

git remote add origin git@bitbucket.org:xxxxx/wpdoctest.git 

git push -u origin master

 

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

 

Please note again that I can push to my other Bitbucket repositories and I can pull from other private repositories I have access to but I can't push to this one (and it's mine).

 

2 answers

0 votes
Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 6, 2017

Have you added your SSH key in the git repository permission?

Check https://confluence.atlassian.com/bitbucketserver/ssh-user-keys-for-personal-use-776639793.html for details

Osvaldo - Greenpeace España December 6, 2017

Yes, as I said in my previous reply, it works for the other repositories and for this repository with the https url. It doesn't let me add it to the repository as I already have it in the account.

jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 6, 2017

This is Bitbucket Cloud. If the user account has the key then it doesn't need to be added to any specific repo.

Osvaldo - Greenpeace España December 6, 2017

Thank you.

Jobin Kuruvilla [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
December 6, 2017

@jredmondAh ok, didn't notice that :)

0 votes
Osvaldo - Greenpeace España December 6, 2017

I've noticed that it works with the https url:

git remote add origin 

https://xxxxx@bitbucket.org/xxxxx/wpdoctest.git

but Bitbucket suggests the git url that does not work.

The other repos have the https url as well.

jredmond
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 6, 2017

It's likely that your SSH agent isn't running, or doesn't have the appropriate key(s) added. Is your key listed when you run `ssh-add -L`? Does Bitbucket come back with your username if you run `ssh -T git@bitbucket.org`?

Osvaldo - Greenpeace España December 6, 2017

ssh-add -L returns "The agent has no identities."

ssh -T git@bitbucket.org returns "Permission denied (publickey)."

Thank you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events