4

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?

Harley Fuagras
  • 499
  • 4
  • 12

1 Answers1

3

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:

Michael Troger
  • 3,336
  • 2
  • 25
  • 41