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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,460,613
Community Members
 
Community Events
176
Community Groups

Can't read from remote repository

Hello,

i create a new repository inside bitbucket. I run this commands, like the commands bitbucket shows on the repository page, copy and paste:

git remote add origin git@bitbucket.org:...
git push -u origin master

But by the push command i got the error:
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.

This is what i checked:
- I renew my ssh key in bitbucket
- git remote -v show the correct url to the repository
- ssh -Tv git@bitbucket.org works fine, because i got the message "authenticated via ssh key. You can use git to connect to Bitbucket. Shell access is disabled"

What can be wrong?

Cheers
Ralf

1 answer

0 votes
Syahrul Atlassian Team Jan 16, 2023

Hey Ralf,

G'day.

I'd say use the following verbose command with the git push options parameter, as it'll give you more information on why the push failed:

GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git push -u origin master

Look at what SSH config git uses and what keys are being offered to push. There's usually an issue where git uses a different ssh config that redirects to another ssh key which causes the issue.

Cheers,
Syahrul

 

Hi Syahrul,

this is the result from your command:

redacted

As far as I can see, the id file is correct. The only error is, that the remote repository cant be read

Cheers
Ralf

Syahrul Atlassian Team Jan 17, 2023

Hey Ralf,

I remove the log due to privacy concerns.

From the log, I noticed it uses a different SSH key to authenticate from the default

/Users/<name>/.ssh/config location, so I wonder which key you used on your account.

If it's the default id_rsa, then can I suggest you manually add the following in the 

/Users/<name>/.ssh/config to explicitly ask SSH to use the default key only:
  1. Run the following command, replacing the {ssh-key-name} with the name of the private key:

    ssh-add ~/{ssh-key-name}
  2. To ensure the correct SSH key is used when connecting to Bitbucket, update or create your SSH configuration file (~/.ssh/config) with the following settings:

    Host bitbucket.org
     AddKeysToAgent yes 
    IdentityFile /Users/<name>/.ssh/{ssh-key-name}

    Where {ssh-key-name} is the location of the private key file once it has been added to the ssh-agent.

Let me know how it goes.

Cheers,
Syahrul

 

Suggest an answer

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

Atlassian Community Events