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,461,203
Community Members
 
Community Events
176
Community Groups

can't git clone with SSH

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


git did not exit cleanly (exit code 128) (1313 ms @ 2022/03/28 14:32:58)"

I get an error like this and can't clone.

1 answer

0 votes

Hi @hayato_nasu and welcome to the community.

I would like to ask a few questions so we can better help you:

1. Is the repo you are trying to clone hosted in Bitbucket Cloud (https://bitbucket.org/) or in Bitbucket Server (self-hosted instance)?

2. Are you cloning from a terminal application or from a Git GUI client?

3. What is the version of Git on this machine and also the operating system?

4. Are you able to clone any other Bitbucket repo you have access to or do you get the same error when cloning other Bitbucket repos as well? (This is to narrow down if the problem seems to be repo specific or not)

5. Could you please try cloning with the following command and attach the full output here?

GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git clone <repo-url-here>

This command should give more verbose output. Please make sure to remove any private/sensitive data from the output prior to sharing.

Kind regards,
Theodora

Hi Theodora-san

Thank you for support.

I answer the questions.

1.I am trying to clone host in  Bitbucket Cloud.

2.I am cloning from Git GUI client.

3.The version of Git is 2.8.0.

4.I get the same error with clones of other bitbucket repositories.

5.I don't know how to check this.
When I try to clone the repository I want to clone, I get the following error:

fatal: Could not read from remote repository.

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


git did not exit cleanly (exit code 128) (1750 ms @ 2022/03/31 10:02:23)

 

Thank you.

Hi @hayato_nasu,

Thank you for the info.

  • Which Git GUI client are you using?
  • Is this Git client using OpenSSH, PuTTY - Pageant or a different SSH client?
  • What is the operating system on your machine?


My suggestions would be:

1. First, upgrade Git on your machine to the latest version

2. Then, navigate to the ~/.ssh directory on your machine. Create there a file named config and add the following in the file (if the file already exists, just add the following lines):

Host bitbucket.org
HostName bitbucket.org
PreferredAuthentications publickey
IdentityFile /Users/myUser/.ssh/id_rsa

Replace /Users/myUser/.ssh/id_rsa with the path to the private SSH key you are using for Bitbucket

3. Afterwards, use a command line application to clone a Bitbucket repository via SSH (e.g. the Terminal application in Linux/MacOS, or if you're on Windows you can use Git Bash).

Please let me know if this succeeds or fails
(this is to narrow down whether the problem is specific to the Git GUI client or not).

4. If the clone still fails, please clone again from the same command line application using the following command and attach the full output here (after removing any sensitive data from the output)

GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git clone <repo-url-here>

Replace <repo-url-here> with the SSH URL of your repo.

Please feel free to let me know if you have any questions.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events