Bitbucket无法执行git upload-pack [英] Bitbucket cannot execute git upload-pack

查看:79
本文介绍了Bitbucket无法执行git upload-pack的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试克隆存储库,但是收到一条错误消息,每次尝试时都会显示以下内容:

I am trying to clone a repository, but I get an error message, stating the following whenever I try that:

Bitbucket cannot not execute "git upload-pack ...". The command is not supported as entered.

Ensure you are using a supported SCM, check the syntax and try again.
fatal: Could not read from remote repository.

我已经阅读了一些,很多人将其链接到SSH身份验证.但是,我已经设置了所有密钥,每次尝试都要求我进行身份验证.

I have read up a bit, and a lot of people link this to SSH authentication. However, I have my keys all set up and I'm being asked to authenticate for every try.

密钥是使用ssh-keygen生成的,输入的密码正确.

The keys were generated with ssh-keygen, and the passphrase I enter is correct.

我无法真正找出问题所在.我尝试克隆各种存储库,但每次都会以这种方式结束.

I can't really figure out the problem. I tried cloning various repos, but I end up with this every time.

到目前为止,我尝试使用git bash以及TortoiseGit GUI的帮助来克隆存储库.

So far I tried to clone the repository with the git bash, as well as with the help of the TortoiseGit GUI.

也许值得一提的是我正在使用SSH路径.

It might be worth mentioning I am using an SSH path.

我现在尝试了其他几个存储库.我总是以这个错误告终.我想那一定是本地的东西或者是关于我的钥匙的东西.

I tried several other repositories now. I always end up with this error. I guess it must be something local or something about my keys.

推荐答案

这似乎是 Git for Windows 2.14.0引入的问题.通过SSH上的git upload-pack命令,Bitbucket SSH上不兼容.

This seems to be a problem introduced with Git for Windows 2.14.0. There is an incompatibility on Bitbucket SSH with the git upload-pack command over SSH.

这也解释了为什么HTTPS不受影响.

This explains also, why HTTPS is not affected.

在以下提交中,将git_connect更改为使用git upload-pack而不是git-upload-pack,并且Bitbucket不满意(不支持输入的命令). https://github.com/git/git/commit/40023e58cda656326287d77358514acb262b7484

In the following commit, git_connect was changed to use git upload-pack instead of git-upload-pack and Bitbucket is not happy with that (The command is not supported as entered). https://github.com/git/git/commit/40023e58cda656326287d77358514acb262b7484

另请参阅提交的消息:

git_connect:比起虚线形式更喜欢Git的内置函数

这有助于以最小的安装(例如MinGit)拒绝安装 通过运送相同的内建副本(.zip 文件不支持硬链接.

This helps with minimal installations such as MinGit that refuse to waste .zip real estate by shipping identical copies of builtins (.zip files do not support hard links).

GitLab遇到了同样的问题: https://gitlab.com/gitlab-org/gitlab-ce/issues/36028

GitLab was running into the same problem: https://gitlab.com/gitlab-org/gitlab-ce/issues/36028

我只能在Bitbucket v4.8.1上对此进行验证,也许在更高版本中已修复.

I could only verify this on Bitbucket v4.8.1, maybe this is fixed in a later version.

解决方法:

回滚到Git 2.13.x或切换到HTTPS.

Roll back to Git 2.13.x or switch to HTTPS.

解决方案:

此问题已在> https://jira.atlassian.com/browse/BSERV中解决. -10013 .提交已在Windows的Git中恢复.版本v2.14.0.windows.2应该可以解决此问题(

The issue has been addressed in https://jira.atlassian.com/browse/BSERV-10013. The commit has been reverted in Git for Windows. The Version v2.14.0.windows.2 should fix the issue (https://github.com/git-for-windows/git/releases/tag/v2.14.0.windows.2).

这篇关于Bitbucket无法执行git upload-pack的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆