Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can not push but can fetch/pull

mkuchirov June 25, 2022

Hello. I can't push to a remote repository, but I can fetch and pull. I added my public SSH key in the repository settings (the owner of the repository is not me, but my client). I was able to download the files, now I have made edits on the local machine and I want to push but I can't. The error I am getting:

Unauthorized
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

1 answer

1 accepted

1 vote
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 28, 2022

Hello @mkuchirov ,

Thank you for reaching out to Atlassian Community!

The reason why you are not being able to pull changes is because SSH keys added directly in the repository level, known as Access Keys, grant only read-only access to the repository, so with this key you will only be able to clone/fetch/pull from the repository.

In case you want to make pushes with a SSH key, you should add the key to your bitbucket personal account settings, so the key will be associated with your bitbucket user, and have the same access as your account, meaning you can use the key to read/write to any repository that your account was granted read/write access to.

You can have more details about the SSH key creation and how to add it to your account settings by referring to the following documentation : 

Hope that helps! Let me know if you have any questions.

Thank you, @mkuchirov .

Kind regards,

Patrik S

mkuchirov June 28, 2022

hello, thanks, got it

Like Patrik S likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events