GIT LFS(仅支持 application/vnd.git-lfs 和 application/vnd.git-lfs+json)

标签 git git-lfs

LFS 支持已经与我们的 Azure GIT 存储库一起工作了很长时间,但在推送大文件提交时突然失败。它开始上传。看起来像是重新启动了几次然后就失败了。

C:\Git\...>git push
Locking support detected on remote "origin". Consider enabling it with:
  $ git config lfs.https://<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="614f4f4f210504174f001b1413044f020e0c" rel="noreferrer noopener nofollow">[email protected]</a>/.../.../_git/....git/info/lfs.locksverify true
LFS: Client error: https://<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="674949492703021149061d1215024904080a" rel="noreferrer noopener nofollow">[email protected]</a>/.../.../_git/.../info/lfs/objects/... from HTTP 413
Uploading LFS objects:   0% (0/1), 0 B | 18 MB/s, done.
error: failed to push some refs to 'https://dev.azure.com/.../.../_git/...'

客户端错误是:仅支持 application/vnd.git-lfs 和 application/vnd.git-lfs+json

使用:

  • git 版本 2.33.1.windows.1
  • git-lfs/3.0.1(GitHub;Windows amd64;go 1.17.1)

更新 问题是一致的。添加新文件会产生相同的错误。我已经重新安装了 GIT/GIT-LFS,并清理了 GIT repo 文件夹。没有变化。

最佳答案

偶然发现这个https://developercommunity.visualstudio.com/t/git-lfs-push-got-413-error/867488在调查时。调用下面的命令解决了我的问题。

git config http.version HTTP/1.1

关于GIT LFS(仅支持 application/vnd.git-lfs 和 application/vnd.git-lfs+json),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69894412/

相关文章:

ios - 使用 GIT LFS 跟踪没有文件扩展名的大型二进制文件

git - 我似乎无法在命令行中更改文件的访问权限

git - 为什么 git shallow clone 可以比 <depth> 有更多的提交?

macos - OS X : portable Git (aka install multiple Git versions)

git error unpack failed missing blob on git review to gerrit

linux - 删除不在 repo 中的 git LFS 文件

git bash 如何启用快速编辑模式?

git - 有没有办法配置 git commit 的输出?

git - 从存储库中的 "git-lfs"文件中检索原始文件