Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,296,713
Community Members
 
Community Events
165
Community Groups

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

1 vote
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.

Samkelo I'm New Here Jan 18, 2022

"not the one on my account itself."  Where is the location of this key then. Which account you refering to here. I'd appreciate a bit of detailed response here because I'm having the same issue here. 

Samkelo I'm New Here Jan 18, 2022

I also followed the same instructions given in that link as well. 

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?

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.

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.

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?

Suggest an answer

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

Git push size limits are coming to Bitbucket Cloud starting April 4th, 2022

Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...

2,200 views 2 9
Read article

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