`Repository or object not found` when `git lfs push origin master`

The full output of git lfs push origin master is like this:
yw662@yw662 % git lfs push origin master
batch response: Repository or object not found: https://2fbc897d-8dff-4daa-8013-5b4cf6a2f975.netlify.app/.netlify/large-media/objects/batch
Check that it exists and that you have proper access to it
Uploading LFS objects: 0% (0/24), 0 B | 0 B/s, done.

I have read about `git push` and `git lfs push origin master` keeps failing, but I am not sure whether it is the same problem so I put it here.

The total payload contains just 11MB and 24 files. I don’t think it is because of the size or number of files.

netlify lm:info looks like this:

  âś” Checking Git version [Git-128)]
  âś” Checking Git LFS version [2.13.2]
  âś” Checking Git LFS filters
  âś” Checking Netlify's Git Credentials version [0.1.9]

GIT_TRACE=true GIT_CURL_VERBOSE=true git lfs push --all origin shows 404 at the very first request (POST /.netlify/large-media/objects/batch HTTP/1.1):

18:20:48.104468 exec-cmd.c:139          trace: resolved executable path from Darwin stack: /Library/Developer/CommandLineTools/usr/bin/git
18:20:48.105410 exec-cmd.c:238          trace: resolved executable dir: /Library/Developer/CommandLineTools/usr/bin
18:20:48.106426 git.c:702               trace: exec: git-lfs push --all origin
18:20:48.106443 run-command.c:663       trace: run_command: git-lfs push --all origin
18:20:48.141603 trace git-lfs: exec: git 'version'
18:20:48.144733 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'remote'
18:20:48.147271 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'
18:20:48.150361 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' '--git-dir' '--show-toplevel'
18:20:48.152637 trace git-lfs: exec: git 'config' '-l'
18:20:48.155003 trace git-lfs: exec: git 'rev-parse' '--is-bare-repository'
18:20:48.157053 trace git-lfs: exec: git 'config' '-l' '-f' '/Users/yw662/artsoft-data/.lfsconfig'
18:20:48.159699 trace git-lfs: Upload refs [] to remote origin
18:20:48.159756 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'show-ref'
18:20:48.162895 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'show-ref'
18:20:48.165145 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'ls-remote' '--heads' '--tags' '-q' 'origin'
18:20:49.193154 trace git-lfs: tq: running as batched queue, batch size of 100
18:20:49.193700 trace git-lfs: run_command: git rev-list --objects --do-walk --stdin --
18:20:49.196440 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'cat-file' '--batch-check'
18:20:49.198574 trace git-lfs: exec: git '-c' 'filter.lfs.smudge=' '-c' 'filter.lfs.clean=' '-c' 'filter.lfs.process=' '-c' 'filter.lfs.required=false' 'rev-parse' '--git-common-dir'
18:20:49.220218 trace git-lfs: tq: sending batch of size 24                                                                                                                                    
18:20:49.221379 trace git-lfs: api: batch 24 files
18:20:49.221745 trace git-lfs: exec: /usr/bin/security 'list-keychains'
18:20:49.240889 trace git-lfs: exec: /usr/bin/security 'find-certificate' '-a' '-p' '-c' '2fbc897d-8dff-4daa-8013-5b4cf6a2f975.netlify.app' '/Library/Keychains/System.keychain'
18:20:49.259203 trace git-lfs: HTTP: POST https://2fbc897d-8dff-4daa-8013-5b4cf6a2f975.netlify.app/.netlify/large-media/objects/batch
> POST /.netlify/large-media/objects/batch HTTP/1.1
> Host: 2fbc897d-8dff-4daa-8013-5b4cf6a2f975.netlify.app
> Accept: application/vnd.git-lfs+json; charset=utf-8
> Content-Length: 2243
> Content-Type: application/vnd.git-lfs+json; charset=utf-8
> User-Agent: git-lfs/2.13.2 (GitHub; darwin arm64; go 1.16beta1)
> 
{"operation":"upload","objects":[{"oid":"c60a6945c5651b205a7c3350fb74252ebd47b7fcc2d32b7dec40cd80aa8a4e51","size":1582219},{"oid":"f049e85fe41e6df5948685394b2790c296eec2c3573ae3df73e5c47438c6533f","size":1266254},{"oid":"814d395174b3f468935a93a4c27ea9f234ba75ef8950cdad48407b3c9bf57e9c","size":1234280},{"oid":"79d89a6768c3915ea6d49956730907946c95405e533abcf08746a1f538a28e1f","size":954033},{"oid":"9fc17fe1f520054bd2b0fbed1a393864f1091bab29bcdb95895f46d05549333b","size":882564},{"oid":"9111d927b684d2190410008843dbbcf8223a7f71ba00bb94fc1bb27d067dafa3","size":782860},{"oid":"076f9e025235dc13a9921124748b258414f743501526c638b80f60dacd7f58bd","size":744635},{"oid":"c2b54486178990b4d9999e1987116e40479892e004d996b29bdb03879f9f0dcc","size":715163},{"oid":"d8994dac0a8b7ed259c146789692b89785c463f2cb61c03c8680d99dd1baa36d","size":706392},{"oid":"b7383b9bc9a046ec495fb4ed605639f8085573b828877655fdfaa9d2e0093531","size":644323},{"oid":"19680a8ab51c1beab3a9f341047392a7adceb3388e82557c1493f5391ec65672","size":636171},{"oid":"e4e2812579f1580e216808e614973e575fa4b7ab73278a6254f8ffc65eb2546d","size":379134},{"oid":"c97528a2fbb8655a24aa524f33099d5866e2ba80b3b604635fcbab06ad6521a4","size":214386},{"oid":"c4e5ef83da99fa859e447f2b518b48bb9913baae07d35aae035fcfc7b05eec86","size":134416},{"oid":"3e3c10b3026c05d8bb05a347f9542cef69d8afe8f76f23432fbd434c57e6867e","size":116950},{"oid":"cbed1db41e3b0dd7158d81ebf31ed53bd1087a722303bcec09b000d2b83b441e","size":111524},{"oid":"60193e1acd84e3efc94e33f127cfc378b184a473400cd9adfb75048589dfea34","size":90212},{"oid":"1c002d19d8d9c9d44fdb5f1754f80a72d4728666ac9ae337d900af3cbed79791","size":75948},{"oid":"90523a7c21124620380f829fa8a5e2b6247001fee4c17efed83fc25a80328c26","size":71756},{"oid":"c5c8273d7124d38fe4e8839a9649e4ba6b702d168e532ab28d6a99e891a87ca2","size":66900},{"oid":"1a57ea656362b204273bd1778f6e035bd5d5023a19e180f25e0c47d4cf598714","size":57982},{"oid":"9888a11fa27ac9d1517d031af291225e68485c048f4a964c6f7dad075a924b4a","size":19604},{"oid":"b9cfe4856b517ca379fc60da2d295760f40029bdaec25f1334e18153b747ad0f","size":15844},{"oid":"3bb1524b6f99a66444827d38b8ac771d77c7cbcfe701848a7acf75495546d440","size":6092}],"transfers":["lfs-standalone-file","basic"],"ref":{"name":"refs/heads/master"}}18:20:49.604615 trace git-lfs: HTTP: 404

So netlify large media is only usable after first successful deploy.

Solved by fake a successful empty deploy :slight_smile:

I really hope this behavior is mentioned somewhere in the doc though.

(deploy command: mkdir dist/)

Hi, @yw662. This isn’t specifically mentioned. I have an issue filed with our documentation team to update the text here:

From this:

to this:

The added text is in bold above. The update is in the works and if there are other questions or comments, please reply here anytime.

1 Like

We have now updated the docs per your feedback, @yw662 ! Thanks again for being such an engaged customer :slight_smile:

@yw662 “solved by fake successful empty deploy”. can you please explain what you did to solve this?

Hey there, @afsheen :wave:

If your question here is related to Large Media, let’s keep the conversation going on the other thread you opened :slight_smile: This will streamline the conversation! Thanks.