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?
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 !!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.