Large Media--can no longer push or pull after cloning (TLS error)

Hello, I cloned a repo to a new computer and did not set up git LFS when pushing some work (including an image) and deploying. I realized my mistake and got everything set up (git lfs and the netlify cli), Now I cannot pull from main or push new images. I keep getting this error: batch response: Post "https://[xyz].netlify.app/.netlify/large-media/objects/batch": tls: first record does not look like a TLS handshake. I’ve tried all the things in the support forums, and I’m starting to think that by pushing that image, my netlify set up is messed up? I’m unsure how to fix this. Thank you.

When I run netlify lm:info I get

 ✔ Checking Git version [Git-137.1)]
  ✔ Checking Git LFS version [3.4.0]
  ✔ Checking Git LFS filters
  ✔ Checking Netlify's Git Credentials version [0.1.11]

(I do have to manually load in the git credentials helper into the shell each time to zsh, but that’s another problem)

Hi, @kristinjval. You may need to “re-push” all the Git LFS object to Netlify now that the Large Media add-on is configured for the new system.

That can be done with this:

git lfs push --all origin

Would you please try running that in the base directory of the repo (after loading the Git credential helper)?

If that doesn’t work, would you please run the following and share that with one of our support team in a private message (AKA a DM)?

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

Finally, about having to load the Git credential helper manually, if you add whatever command you are using to your ~/.zshrc file.

When running netlify lm:setup to configure a local repo directory to use Large Media, something similar to this is printed to the screen:

   ┌───────────────────────────────────────────────────────────────────────────────┐
   │                                                                               │
   │       Run this command to use Netlify Large Media in your current shell       │
   │                                                                               │
   │   source /Users/<USERNAME HERE>/Library/Preferences/netlify/helper/path.zsh.inc   │
   │                                                                               │
   └───────────────────────────────────────────────────────────────────────────────┘

If you add that (the source command) to ~/.zshrc, it should resolve the issue of needing to manually enable it for each new shell instance (each time a new terminal window is opened).

​Please let us know if there are other questions or if the git lfs push --all origin command does not resolve this issue.

When I try to push everything, I get the same message for each image:
batch response: Post "https://[xyz].netlify.app/.netlify/large-media/objects/batch": tls: first record does not look like a TLS handshake

I sent you a DM from the git trace.

I’m still having the problem, but an update:

I managed to pull from main by not downloading the non-tracked image by using GIT_LFS_SKIP_SMUDGE=1 git pull

Then I added the required pointer to that image using
git lfs migrate import --yes --no-rewrite "img/image.jpg"

I attempted to then run git push then git lfs push --all origin but I get the same error I’ve been getting this whole time: first record does not look like a TLS handshake. I’m fairly convinced at this point something is messed up on my site.

Hi, @kristinjval. Thank you for sharing the debugging logs with us. The error preventing the push does appear to be the one below:

tls: first record does not look like a TLS handshake

I don’t see any clues in the logs to explain it, though.

In some cases, the root cause of that error has been that the system in question is using a proxy:

However, those errors specifically mention proxyconnect where the logs sent by you do not. That is only clue I have found so far.

Are you perhaps using a proxy or VPN?

I’m also curious if perhaps your local network or ISP is redirecting the HTTP request. What IP addresses are returned for the command below (replacing [xyz] with the site API id for this site)?

  • nslookup [xyz].netlify.app

I’m not using a proxy or VPN. I’ll DM you the IP addresses, I do not know if those are sensitive or not.

I’ve decided to remove this from my site, it’s too much of a pain. thanks for your help

thanks for coming back and confirming.