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

Admin cannot clone all repos in workspace

md2perpe September 18, 2020

I made a colleague admin of a workspace, yet he cannot clone all repositories in that workspace. He could clone one of the repositories, but not another.

He has added an SSH key in the account and to ~/.ssh/config.

Anyone has an idea of what might be the reason and how to solve it?

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 18, 2020

Hello and welcome to the community!

Is your colleague able to access from browser the repo he cannot clone?

One possibility is that the User group that your colleague has been added to does not have access to the repo he cannot clone. Sometimes users accidentally remove certain user groups, even admin groups, from the repo's Settings.

To double check, you can go to Repository Settings > User and group access > make sure that the User group you added your colleague to is listed in the Groups section.

If he can view the repo from browser, then it doesn't sound like this is a permissions issue.

In this case, it would be helpful to see the output of the clone command as this could give us an indication of why this issue occurs. Would you be able to share this with us?

Kind regards,
Theodora

Per Persson September 20, 2020

He sent me a screenshot listing all repositories, including the one that he cannot clone.

I see no difference on the **User and group access** pages for that repository and the one he could clone.

Here's the output from when he was trying to clone the repository:

git clone git@bitbucket.org:ingridcloud/geometry.git
Cloning into 'geometry'...
Unauthorized
fatal: Could not read from remote repository. Please make sure you have the correct access rights
and the repository exists.
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 21, 2020

Hello,

One possible reason I can think of is that an incorrect SSH key may be used to clone the repo.

Assuming that the name of the private key he generated for his Bitbucket account is named id_rsa, I would suggest asking him to clone with the following command and see if it works:

GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa" git clone git@bitbucket.org:ingridcloud/geometry.git

If this also fails, then we would need to see the output of:

ls -lah ~/.ssh

to see if there are more than one SSH keys there, the output of

GIT_SSH_COMMAND="ssh -Tvvv -i ~/.ssh/id_rsa" git clone git@bitbucket.org:ingridcloud/geometry.git
GIT_SSH_COMMAND="ssh -Tvvv" git clone git@bitbucket.org:ingridcloud/geometry.git

so that we have more verbose output on the clone commands (both with and without specifying the SSH key to be used)

and also the contents of his ~/.ssh/config file, just the entries that are referring to bitbucket.org

Kind regards,
Theodora

Like Stephanie Poulin likes this
Per Persson September 21, 2020

We found the reason. He had added his SSH key to one repository instead of to his account. Therefore he could clone that repository but not another.

Like Theodora Boudale likes this
Stephanie Poulin July 17, 2023

I had the same issues and adding :

GIT_SSH_COMMAND="ssh -i ~/.ssh/{my ssh key name}"

 did fix it thank you so much you saved so much time !!!!

Like Theodora Boudale likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events