简体   繁体   English

无法通过SSH使用Git for Windows 2.14克隆/拉/推存储库

[英]Unable to clone/pull/push a repository with Git for Windows 2.14 over SSH

I recently formatted my computer and upgraded to Windows 10 but forgot to backup my SSH keys for my gitlab repositories. 我最近格式化了我的计算机并升级到Windows 10但忘记备份我的gitlab存储库的SSH密钥。 So I have just created a new SSH key and copypasted it to gitlab.com/profile/keys. 所以我刚刚创建了一个新的SSH密钥并将其复制到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 GitLab:禁止命令

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 请确保您具有正确的访问权限,并且存储库存在.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? 有任何想法吗?

EDIT: the bug is already solved in Git for Windows 2.14.0(2) 编辑:该错误已在Git for Windows 2.14.0(2)中解决

The problem was due to a version conflict between Git and GitLab on Windows. 问题是由于Windows上的Git和GitLab之间的版本冲突。 The OP could solve the issue using an older Git version (2.13.0). OP可以使用较旧的Git版本(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. GitLab问题36028是一个已知的错误,当尝试通过SSH使用Git 2.14提取/获取/克隆/推送时发生。 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. Git v2.14以后使用git upload-pack而不是git-upload-pack,至少通过SSH,GitLab将其作为不允许的命令阻止。

More maybe helpful links when having problems with GitLab via SSH: 当通过SSH遇到GitLab问题时,更多可能是有用的链接:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM