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

Error while cloning repo

besucher80
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!
November 10, 2023

Hi, 

i have created a ssh key for bitbucket, add it in the repo to ssh keys.
Then i create a ssh config like this:

Host bitbucket.org
  HostName bitbucket.org
  IdentityFile ~/.ssh/bitbucket

If i now clone :

git clone git@bitbucket.org:UNAME/REPO.git

i got:

Cloning into 'TESTT'...

Unauthorized

fatal: Could not read from remote repository.

 

Please make sure you have the correct access rights

and the repository exists.


Why dont come the password prompt? Someone a idea why this come?

Thanks

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 14, 2023

Hi @besucher80 and welcome to the community!

In your config file, I see that you specify ~/.ssh/bitbucket as an Identity file. Is this the correct path and name of the private key on your computer, whose public key you have uploaded to Bitbucket?

Can you please try cloning with the following command and post the full output here(after sanitizing workspace-id, repo name etc)? This command will show verbose output and possibly an indication of what is going wrong.

GIT_SSH_COMMAND="ssh -vvv" git clone git@bitbucket.org:workspace-id/repo.git

The reason that you don't get a password prompt is that you are using an SSH clone URL and authentication is done with the SSH keys. A password prompt shows when you clone with an HTTPS URL like this:

https://username@bitbucket.org/workspace-id/repo.git

If you specified a passphrase for the SSH key pair when you generated it, then you should see a prompt to enter the passphrase.

Kind regards,
Theodora

Suggest an answer

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

Atlassian Community Events