我有一个私有的repo,几个月前我从github迁移到了gitlab.com。今天,我突然不能将二进制git-lfs文件推送到我的存储库。据我所知,直到今天我还没有遇到任何麻烦。我的git lfs env显示了这个端点:
% git lfs env
git-lfs/2.9.1 (GitHub; linux amd64; go 1.13.1)
git version 2.24.0
Endpoint=https://gitlab.com/garyo/horizon-project/info/lfs (auth=none)
LocalWorkingDir=/c/dss/Product/Horizon/WebProjects/horizon-project/horizon
错误是这样的:
% GIT_CURL_VERBOSE=1 git lfs push origin master
...
16:28:29.155229 trace git-lfs: HTTP: POST https://gitlab.com/garyo/horizon-project/info/lfs/objects/batch
> POST /garyo/horizon-project/info/lfs/objects/batch HTTP/1.1
> Host: gitlab.com
> Accept: application/vnd.git-lfs+json; charset=utf-8
> Content-Length: 285
> Content-Type: application/vnd.git-lfs+json; charset=utf-8
> User-Agent: git-lfs/2.9.1 (GitHub; linux amd64; go 1.13.1)
>
{"operation":"upload","objects":[{"oid":"af24ad604dd7b3bcda8f975ab973075f4a2f70a4087944a12f8ef8b63a3e07c2","size":665},{"oid":"3ed612f41e050ca5e7000cad6f1cbe7e7da39f65fca99c02e99e6591056e5837","size":628}],"transfers":["lfs-standalone-file","basic"],"ref":{"name":"refs/heads/master"}}16:28:29.469808 trace git-lfs: HTTP: 404
< HTTP/1.1 404 Not Found
< Content-Length: 3108
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Content-Type: text/html; charset=utf-8
< Date: Wed, 11 Dec 2019 21:28:31 GMT
< Expires: Fri, 01 Jan 1990 00:00:00 GMT
< Gitlab-Lb: fe-12-lb-gprd
< Gitlab-Sv: web-18-sv-gprd
< Pragma: no-cache
< Server: nginx
< X-Request-Id: tJHBYOXl4P7
< X-Runtime: 0.017913
<
16:28:29.470042 trace git-lfs: api error: Repository or object not found: https://gitlab.com/garyo/horizon-project/info/lfs/objects/batch
在我的本地,一切似乎都很好,我可以在没有任何LFS文件的情况下推送提交。git lfs fsck
报告一切正常。这是正确的LFS端点吗?我该怎么做才能让这一切继续下去呢?
发布于 2019-12-12 15:37:28
我想通了。结果是什么(也许是最新的git 2.24?)在我的.git/config
中添加了一个错误的[lfs]
节。去掉它,它又能正常工作了。
https://stackoverflow.com/questions/59294654
复制