Create
cancel
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

Unable to push anything into a new repo

AFAIK, I have my SSH setup locally. I added the public key to the repo, and added BB's details to my known_hosts. AFAIK, now I somehow need to grant my credential 'admin' or even just 'write' access. Currently seems to be locked in with 'view' access only, which is unacceptable.

Command line I do this to verify, which confirms my experience thus far:


$ ssh -T git@bitbucket.org
authenticated via a deploy key.
You can use git to connect to Bitbucket. Shell access is disabled.
This deploy key has read access to the following repositories:
<username>/<repo>

Yet when I try to git push:

$ git push -u origin trunk
Warning: Permanently added the RSA host key for IP address '104.192.141.1' to the list of known hosts.
Unauthorized
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

What gives? How can this be? What do I need to verify? I can apparently clone the repository just fine, which I have done, but I cannot push.

$ git remote -v
origin git@bitbucket.org:username/repo.git (fetch)
origin git@bitbucket.org:username/repo.git (push)

Kind of stymied at the moment until this can be resolved.

5 answers

1 accepted

0 votes
Answer accepted

Ah! Figured it out... I was adding my keys on the repo itself, as mentioned in at least one other place, I was setting that key, and not the one on my account itself. I did that, and immediately, I could push.

Now when I try to add myself as an admin to the members, I am not getting any response, marching ants, if you will, after clicking confirm. Additionally, I see a locked icon next to the project. I'm sure this is not right, either; how can that be so? I created the project, why is it locked?

Further, after some exploring, I have added some admin and other groups, and associated myself in the admin group. Then connected that group with the project and with the repository, AFAIK. Now the project, etc, are no longer locked to me. However, I still cannot push from my Git client. Same sort of errors. I even pulled afresh to begin with, to no avail.

To be clear, I added another repo and AFAIK it has the groups and membership as I might expect them. I can clone it okay, I even merged locally with an unrelated history. All good on my end AFAIK. Now, still getting the issue:

$ git push -u origin trunk
Unauthorized
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

Also, please note, I have multiple public keys going on for my Git. One to Github, another for here. Not sure if that could be confused. On W10 x64 WSL2, I copied from the ~/.ssh/bitbucket_rsa.pub and pasted into my BB access key as per the instructions, correct?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Bitbucket

How do you use the Bitbucket-Jira integration? How does it help your team?

Hey everyone, over the past year, we've added several new features on how you can use Bitbucket and Jira together. We'd love to know how you'll are using the integration and how it's helping your t...

176 views 0 2
Join discussion

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