Can't upload git-lfs files to gitlab: get 404 errors from endpoint

,

I have a private repo that I migrated from github a few months ago. Today, suddenly I can’t push binary git-lfs files to my repo. As far as I know, I haven’t had any troubles til today. My git lfs env shows this endpoint:

% 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

and the errors are like this:

% 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

Everything seems fine on my local, and I can push non-LFS files just fine. Is that the right LFS endpoint? What can I do to get this going?

Figured it out. Turns out something (latest git 2.24 perhaps?) added an errant [lfs] stanza to my .git/config. Removed that and it all worked again.

1 Like