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

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.

0 vote

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 06, 2018 in Bitbucket

Do you use Bitbucket Cloud and Jira Cloud? If so, let us know!

Hi Community, I'm Julia and I'm on the Jira Software Cloud marketing team!  We're looking for companies or teams using Bitbucket Cloud and Jira Software Cloud. If your team fits the t...

87 views 3 3
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