Git Clone 失败。

7

问题

我正在尝试从bitbucket克隆,但失败了。

其他stackoverflow帖子

我已经查看了其他stackoverflow帖子,但没有成功。具体而言:

  1. shallow/unshallow没有起作用。
  2. PostBuffer增加到1 gb也没有起作用。
  3. core.compression已经是0,表示已禁用,但它没有起作用。

使用cmd进行克隆

我尝试使用--depth 1--unshallow进行克隆,但它没有起作用。

当尝试使用git pull --all时,它会出现以下错误:

enter image description here

使用Eclipse(Spring Toolsuite 3)进行克隆

然后,我尝试使用Eclipse(Spring IDE)使用ssh进行克隆,但仍然失败,并显示以下错误:

enter image description here

这似乎是由于历史记录中存在某个大对象引起的。

问题

  1. 如果我因为历史记录中有一个大对象而出现此错误,我可以删除吗?如何做到这一点?
  2. 这是我使用的git客户端的限制,还是Bitbucket存储库主机的限制?
  3. 我应该尝试使用其他git客户端来克隆/拉取存储库吗?

更多信息

使用git config --list查看Git配置。

core.symlinks=false
core.autocrlf=true
core.fscache=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=true
help.format=html
rebase.autosquash=true
http.sslcainfo=[CERT FILE]
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
filter.lfs.clean=git-lfs clean -- %f
filter.lfs.smudge=git-lfs smudge -- %f
filter.lfs.process=git-lfs filter-process
filter.lfs.required=true
credential.helper=manager
user.email=[EMAIL]
user.name=[NAME]
winupdater.recentlyseenversion=2.23.0.windows.1
core.compression=0
http.postbuffer=1048576000
core.repositoryformatversion=0
core.filemode=false
core.bare=false
core.logallrefupdates=true
core.symlinks=false
core.ignorecase=true
remote.origin.url=[URL]
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master

这个代码仓库没有使用 LFS

一个我遇到的建议是使用一个旧版本的 Eclipse,它可以成功地进行克隆。为什么呢?

Eclipse(sts)中的错误详情如下:

enter image description here

Spring Tool Suite 4.4.0也出现了上述错误,环境细节如下:

enter image description here

Java 是 64 位的

enter image description here

一些发现 / 结论

  1. STS的错误是由于其中使用的 JGit 作为 Git 客户端存在大小限制,据我所知
  2. 如果我使用 cmd 中的 Git,或者甚至使用另一个客户端 sourcetree,那么就不会出现该错误。在这种情况下,错误是另一种,内容如下:

    fatal: pack has bad object at offset 90599582: inflate returned 1

    fatal: index-pack failed

  3. Eclipse Oxygen 能够成功克隆。但是背后发生了什么并不清楚。


看起来你使用的是32位客户端,这会将你的大小限制在2G以内。请注意,你的信息中提到了一个10G的块。很可能你需要安装64位版本的git和/或eclipse。同时确保你使用的是最新的git版本之一。 - Serge
我已经看过这个代码文件。第752行实际上会抛出错误。https://github.com/eclipse/jgit/blob/master/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java 你认为这是因为Eclipse是32位的吗?我将在帖子中添加Eclipse STS中的错误会话数据。 - muasif80
你可以看一下部分克隆 - LMC
@Serge Java是64位的。 - muasif80
只需确保 Eclipse 的初始化文件指向该路径 (-vm)。 - Serge
显示剩余2条评论
1个回答

0

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接