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

[push issue] Please make sure you have the correct access rights and the repository exists.

Fikra Systems
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 1, 2024

Issue reproduce

- I logged in into my Atlassian account.
- I create new repo.
- I generated an ssh key.
- I add it into my personal account settings -> add ssh key [ valid ], added successfully.
- Clone the repo.
- Added some changes to push it [issue happened].

error message:

"The requested repository either does not exist or you do not have access. If you believe this repository exists and you have access, make sure you're authenticated. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists."

Note:
my OS is Win 10.

2 answers

0 votes
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 2, 2024

Hello @Fikra Systems ,

and welcome to the Community!

The fact that you're able to clone but not push suggests the following possible issues:

  1. Your user does not have write access to that repository: this does not seem to be the case as your user is admin in the workspace
  2. You have multiple SSH keys in your machine, and the wrong one is being used.

For #2, to confirm which SSH key is being used, could you try executing the push using the verbose flags and sharing the logs with us here?

GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git push

We would be especially interested in the part of the log output where it says something similar to below snippet:

debug1: Will attempt key: /Users/<user>/.ssh/id_rsa RSA SHA256:<SHA>
debug1: Will attempt key: /Users/<user>/.ssh/id_ecdsa

debug1: Will attempt key: /Users/<user>/.ssh/id_ecdsa_sk

debug1: Will attempt key: /Users/<user>/.ssh/id_ed25519 ED25519 SHA256:<SHA>

debug1: Will attempt key: /Users/<user>/.ssh/id_ed25519_sk

debug1: Will attempt key: /Users/<user>/.ssh/id_xmss

debug1: Will attempt key: /Users/<user>/.ssh/id_dsa

debug2: pubkey_prepare: done

debug1: Offering public key: /Users/<user>/.ssh/id_rsa RSA SHA256:<SHA>

 As this will contain the sequence of SSH keys that were attempted for authentication.

Thank you, @Fikra Systems !

Patrik S

0 votes
Fikra Systems
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 1, 2024

i run the following:

remote -v
origin git@bitbucket.org:gateway-group/moit-companies.git (fetch)
origin git@bitbucket.org:gateway-group/moit-companies.git (push)


its valid

------------------------------------------------
I checked 

ssh -T git@bitbucket.org

i got


authenticated via ssh key.
You can use git to connect to Bitbucket. Shell access is disabled.


but the issue still


how to fix it please

Suggest an answer

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

Atlassian Community Events