When I enable Netlify Large Media
on my test site and try to git push
I get the following error:
Remote "origin" does not support the LFS locking API. Consider disabling it with:
$ git config lfs.https://[SITE_ID].netlify.com/.netlify/large-media.locksverify false
batch response: Expected json type, got: "text/plain; charset=utf-8"
Uploading LFS objects: 0% (0/1), 0 B | 0 B/s, done.
error: failed to push some refs to 'git@github.com:[ORG]/[REPO].git'
Here is a more detailed msg with GIT_CURL_VERBOSE=1
:
14:22:36.566995 trace git-lfs: exec: git 'version'
14:22:36.611997 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' 'HEAD' '--symbolic-full-name' 'HEAD'
14:22:36.799008 trace git-lfs: exec: git 'config' '-l'
14:22:36.822009 trace git-lfs: exec: git 'config' '-l' '-f' 'path/to/.lfsconfig'
14:22:36.843010 trace git-lfs: pre-push: refs/heads/master [HASH] refs/heads/master [HASH]
14:22:38.002077 trace git-lfs: HTTP: POST https://[SITE_ID].netlify.com/.netlify/large-media/locks/verify
> POST /.netlify/large-media/locks/verify HTTP/1.1
> Host: [SITE_ID].netlify.com
> Accept: application/vnd.git-lfs+json; charset=utf-8
> Content-Length: 36
> Content-Type: application/vnd.git-lfs+json; charset=utf-8
> User-Agent: git-lfs/2.9.2 (GitHub; windows amd64; go 1.12.7; git 0274d856)
>
{ "ref": { "name": "refs/heads/master" }}
14:22:38.234090 trace git-lfs: HTTP: 200
< HTTP/2.0 200 OK
< Content-Length: 1367
< Age: 1
< Cache-Control: public, max-age=0, must-revalidate
< Content-Type: text/plain; charset=utf-8
< Date: Thu, 05 Mar 2020 22:22:40 GMT
< Server: Netlify
< X-Bb-Proxy: https://lm.services.netlify.com/lfs/locks/verify
< X-Bb-Proxy-Version: v2
< X-Nf-Request-Id: ece0346c-c552-4138-af32-41e6b0844f7a-11882974
< X-Robots-Tag: noindex
<
Remote "origin" does not support the LFS locking API. Consider disabling it with:
$ git config lfs.https://[SITE_ID].netlify.com/.netlify/large-media.locksverify false
14:22:38.236090 trace git-lfs: tq: running as batched queue, batch size of 100
14:22:38.237090 trace git-lfs: run_command: git rev-list --stdin --objects --not --remotes=origin --
14:22:38.295093 trace git-lfs: tq: sending batch of size 1
14:22:38.295093 trace git-lfs: api: batch 1 files
14:22:38.296093 trace git-lfs: HTTP: POST https://[SITE_ID].netlify.com/.netlify/large-media/objects/batch
> POST /.netlify/large-media/objects/batch HTTP/1.1
> Host: [SITE_ID].netlify.com
> Accept: application/vnd.git-lfs+json; charset=utf-8
> Content-Length: 201
> Content-Type: application/vnd.git-lfs+json; charset=utf-8
> User-Agent: git-lfs/2.9.2 (GitHub; windows amd64; go 1.12.7; git 0274d856)
>
{
"operation": "upload",
"objects": [
{
"oid": [HASH],
"size": [SIZE]
}
],
"transfers": [ "lfs-standalone-file", "basic" ],
"ref": { "name": "refs/heads/master" }
}
14:22:38.410100 trace git-lfs: HTTP: 200
< HTTP/2.0 200 OK
< Content-Length: 1367
< Age: 0
< Cache-Control: public, max-age=0, must-revalidate
< Content-Type: text/plain; charset=utf-8
< Date: Thu, 05 Mar 2020 22:22:40 GMT
< Server: Netlify
< X-Bb-Proxy: https://lm.services.netlify.com/lfs/objects/batch
< X-Bb-Proxy-Version: v2
< X-Nf-Request-Id: ece0346c-c552-4138-af32-41e6b0844f7a-11882987
< X-Robots-Tag: noindex
<
Uploading LFS objects: 0% (0/1), 0 B | 0 B/s, done.
batch response: Expected json type, got: "text/plain; charset=utf-8"
error: failed to push some refs to 'git@github.com:[ORG[/[REPO].git'
I was wondering if disabling the lfs lock
is an expected behavior. If so, I think it should be documented in the Netlify Large Media documents/guides.
Disabling the lfs lock
by running the following command does work:
git config lfs.https://[SITE_ID].netlify.com/.netlify/large-media.locksverify false