无法将git-lfs文件上传到gitlab:从端点获取404错误

时间:2019-12-11 21:52:02

标签: git gitlab git-lfs

我有一个私人仓库,几个月前我从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端点吗?我该怎么办才能做到这一点?

1 个答案:

答案 0 :(得分:0)

弄清楚了。事实证明(可能是最新的git 2.24?)向我的[lfs]添加了一个错误的.git/config节。删除它,一切都再次起作用。

相关问题