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

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

This widget could not be displayed.

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.

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`?

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

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

Thank you.

This widget could not be displayed.

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

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.

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

@James RedmondAh ok, didn't notice that :)

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Friday in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

146 views 6 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you