4
votes

I recently formatted my computer and upgraded to Windows 10 but forgot to backup my SSH keys for my gitlab repositories. So I have just created a new SSH key and copypasted it to gitlab.com/profile/keys.

Now I've created a new folder to one of my pre-existing projects but when I try to clone it with

git clone git@gitlab.com:user_name/project_name.git

I am getting

GitLab: Disallowed command

fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.ssh -v git@gitlab.com

If I try...

ssh -v git@gitlab.com

Or...

ssh -T git@gitlab.com

I got to see the correct Welcome message with my name.

Any ideas?

1
Try the solutions described there: gitlab.com/gitlab-org/gitlab-ce/issues/26022Michael Troger
I did not find anything helpful there. Any more ideas?Harley Fuagras
It could be an issue due to a version change in Git. See: gitlab.com/gitlab-org/gitlab-ce/issues/36028 and stackoverflow.com/questions/29588258/… Can you check your .gitconfig?Michael Troger
I would like to download a previous version of Git to test it out but I don't know how. In older releases I cannot find the installable files.Harley Fuagras
Okey, found my way out to download Git-2.13.0 and git clone works as expected. Thank you very much Michael Troger!Harley Fuagras

1 Answers

3
votes

EDIT: the bug is already solved in Git for Windows 2.14.0(2)

The problem was due to a version conflict between Git and GitLab on Windows. The OP could solve the issue using an older Git version (2.13.0). GitLab Issue 36028 was a known bug which occured when trying to pull/fetch/clone/push with Git 2.14 via SSH. Quote:

Git v2.14 onwards uses git upload-pack instead of git-upload-pack, at least over SSH, and GitLab blocks it as a disallowed command.

More maybe helpful links when having problems with GitLab via SSH: