git - GIT LFS(仅支持 application/vnd.git-lfs 和 application/vnd.git-lfs+json)
问题描述
LFS 支持已经在我们的 Azure GIT 存储库中工作了很长时间,但是在推送带有大文件的提交时它突然失败了。它开始上传。看起来它重新启动了几次,然后失败了。
C:\Git\...>git push
Locking support detected on remote "origin". Consider enabling it with:
$ git config lfs.https://...@dev.azure.com/.../.../_git/....git/info/lfs.locksverify true
LFS: Client error: https://...@dev.azure.com/.../.../_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
推荐阅读
- ssl - 在soapUI中冒充自己以外的人发送请求
- c# - 如何从 MVC 中的 3 个表中获取视图中的结果
- angular - ngx-extended-pdf-viewer 中的 Angular 6+ 绑定 [src]
- python - 使用python将现有的子属性值替换为子标记值
- javascript - 如何使用 Parcel 从 TypeScript 文件中导入非 TypeScript 资产
- sql - 从参数值中选择 SQL 列
- r - HighCharter HCAES 方法在 R Shiny Dashboard 中不产生任何可视化
- google-cloud-firestore - 仅通过云功能在 Firestore 中读写
- java - Java:如何以更快的方式从 TB 大小的文件中计算行数
- matlab - 如何有效地做一个托普利茨矩阵matlab