Git push issues with Git LFS and/or Large Media

Not to add clutter to this conversation, but I’m having the exact same issue myself and have been for a while. I’m going to start looking into other solutions for large media files in case there’s some glitch with how this is working out. Followed everything to a tee on MacOS as well and very confused.

Hi, @lapsangsouchy. I split this into a new topic to keep the threads separate.

We are happy to troubleshoot this. Some additional information would help us. Would you please send us the following details?

  • the site subdomain (or API id) for the site not working
  • the output of: netlify lm:info
  • a copy of the error and what the command or action was that triggered the error

You can post this publicly or private message (PM) the information to one of our support staff, whichever you prefer. I’ve confirmed that PMs are enabled for your community login. Note, that only one person can see the PM and this will likely mean a slower reply than posting the information publicly. Please feel free to reply to however you prefer though.

Hello @luke thank you for your reply! Sounds good let me get that information for you…

  • API id is 19568b83-64ac-48e4-9ea7-1afa5b2cf2df
  • netlify lm:info returns
    :heavy_check_mark: Checking Git version [2.26.2]
    :heavy_check_mark: Checking Git LFS version [2.12.0]
    :heavy_check_mark: Checking Git LFS filters
    :heavy_check_mark: Checking Netlify’s Git Credentials version [0.1.9]
  • The command that triggered the error was git push origin main (the same remote and branch linked to my GitHub and Netlify domain)
  • The Error is:
    batch response: Repository or object not found: Check that it exists and that you have proper access to it error: failed to push some refs to ''

Also going off of the other thread as well: I’m confirmed logged into my Netlify Account after looking at netlify status

Thanks for that information, @lapsangsouchy. There are two other details needed next. One you can post publicly but the second should send via private message (PM).

The “safe to post” information is the output of:

git config -l

The information to PM is the output of this:

GIT_TRACE=true GIT_CURL_VERBOSE=true git lfs push --all origin

Note, if there are several pages of output, please feel free to send only up to the first complete 404 response (but please send the complete output of that 404). I have also confirmed PMs are enabled for you community account.

If there are other questions about any of this, please let us know.

For git config -l I got the following:
credential.helper=osxkeychain Lee Smith include.path=/Users/aleesmith/.netlify/helper/git-config credential.helper= credential.helper=netlify credential.helper=osxkeychain filter.lfs.clean=git-lfs clean -- %f filter.lfs.smudge=git-lfs smudge -- %f filter.lfs.process=git-lfs filter-process filter.lfs.required=true core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true core.ignorecase=true core.precomposeunicode=true remote.origin.url= remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.main.remote=origin branch.main.merge=refs/heads/main lfs.

PMing the other response now as well!

Hi, @lapsangsouchy. I’m baffled as it all looks good to me. I’m asking our developers to take a look as I cannot find any explanation myself.

Hi, @lapsangsouchy. It took some time to get an answer on this one but we did find the root cause.

It turns out that there is a dependency for the upload that there be at least one successful deploy of a site before the upload will work.

The usual workflow is this:

  • site is created
  • successful deploy of the site occurs
  • Large Media is enabled for the site

In this case, the middle step has not occurred and the redirects required for the Large Media upload therefore don’t exist.

To resolve this, please make at least one deploy for this site (any successful deploy will do). Once this is done the git lsf push should succeed.

If there are questions about how to do this (or anything else Netlify related) please let us know.

1 Like