Running on Linux.
I have a repository that I am the only user, so I am the admin with all the permissions.
I have set up access through SSH with SSH keys as was specified in the documentation. I am able to run git clone without any errors, but git push ends up with
---
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
---
When running with ssh -vvv as suggested in one of the troubleshooting articles I can see
Authenticated to bitbucket.org (xxx:22) using "publickey".
closely followed by
Unauthorized
Any suggestion is greatly appreciated
Thank you
Hi Greza,
It might be that your SSH key is likely configured with read access (cloning) but restricting write operations (pushing), possibly it being added as a repository access key instead of a personal SSH key.
A) You can try few solutions below:
Verify Key Placement: Check if your SSH key is added to your personal account settings rather than the repository's access keys. Personal keys tie directly to your user permissions, which include full admin rights for pushes.
Test SSH Connection: Run ssh -T git@bitbucket.org to confirm it greets you with your username (e.g., "authenticated via ssh key"). If it does, the issue is likely authorization-specific.
Remote URL Check: Ensure your remote is set to git@bitbucket.org:yourworkspace/yourrepo.git (use git remote -v to verify).
B) Personal resolution (for 1 key and 1 account)
You can read further in these guides:
- Troubleshoot SSH issues
- Set up personal SSH keys on Linux
Best,
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.