GIT_LFS_ENABLED error

I keep getting the following error in deployment: Invalid environment value for ‘GIT_LFS_ENABLED’. What should I have this variable equal to? Are there requirements for this variable?

Hi @stephlane544, you should just set it to true. If you keep having trouble, please share a link to the deploy where you are getting the error and we’ll take a look.

Also, I see you wrote this same question in another thread, please avoid doing this, it helps us to build a better community for everyone. :slightly_smiling_face:

Hi, if I want to disable Large Media: how can I do that? Is this possible with the GIT_LFS_ENABLED variable (value = false)?

Are you trying not to use Git LFS with the repo, @redpop, or are you wanting to uninstall the Netlify Large Media (NLM) add-on for a site at Netlify?

If the answer is removing the NLM add-on, there are several steps in this process and we’d be happy to explain more about ti if this is what you want to do.

I don’t need Large Media anymore and I found this:

Disable Large Media

Because Netlify Large Media and Git LFS change the way your files are saved, disabling Large Media requires assistance from Netlify Support.

I’ve used the Large Media temporarily.

Hi, @redpop, which site is this for?

Deleting the plugin has many caveats and this is why we didn’t expose a button to do this in the Netlify UI at this time. We’re still happy to assist with this manually in the meantime!

First, are you 100% certain you have other copies of all the media stored in Netlify Large Media?

I’m double checking because when Large Media is disabled our copies of those assets will be gone.

If you’re certain you have other copies of these assets (local or otherwise), the next step is to make a branch without the .lfsconfig file. This is because it has the information saying “my LFS server is Netlify”.

That branch should start using the other Git LFS service (or none if you completely stopped using LFS).

This next step only applies if you are now using another Git LFS service. For example, if you are using GitHub’s LFS and you have any files that you only uploaded to Netlify LFS but not there, you’d need to make sure to upload them to GitHub’s LFS. This can be done using the command: git lfs push --all origin remote-branch-name .

That should trigger the deploy for that branch.

If you’re not using another Git LFS service, somehow make a change to the branch to trigger a new deploy and, either way, please let us know if it works or not.

If the deploy goes well but you see that all the files served as pointer files instead of actual assets now, this is expected and there is a fix for it! (If just works and doesn’t show pointers, this is expected if you aren’t using any other Git LFS service.)

If you are using Git LFS with another provider (GitHub, GitLab, etc), add a GIT_LFS_ENABLED build environment variable back again (assuming, that is, that you had it before), to solve the pointer being served in place of the actual files. This environment variable can be added at “Site Name” > Settings > Build & deploy > Environment in the Netlify UI.

Once all this is done we can do the final manual step on our end to disable Netlify Large Media for this site. So, please let us know once you’re at this step.

After we remove the plugin, we’ll ask you to test the deploy again with that branch. This should (if all goes well) be a normal deploy and a working site.

If it is working, then merge that branch to master as the final step. (Yes, some people do all of this testing on their master branch but if this is a production site, we recommend using a branch.)

Please let us know if any step is not clear, and we’ll be happy to rephrase or explain further. Questions are always welcome. :slight_smile:

wow, thanks for the whole explanation.

My site is: lebensfreunde-togo-static-foundation.netlify.com

Currently there are no plans to use Git LFS again (for this site). So, I removed my Git LFS file and deployed the clean branch. Everything is fine now.

Regards
Martin

I removed the Large Media plugin from that site, @redpop. Would you please deploy again and let us know if the deploy is still successful with all images appearing correctly?

Hello, I deployed my site and everything is fine :slight_smile:

Thx

1 Like

Hello, I have this same problem. Tested using Netlify Large Media and decided it was not a good fit. Now I am trying to use git LFS with a third party provider and your build configuration prevents this. Please disable Large Media on my site, kind-tesla-****

hey @blerchin, we’ll be happy to take care of this for you. Can you tell us the full sitename, though? there may be more than one kind-tesla- netlify site out there with LFS, and we wouldn’t want to disable LFS on the wrong site. thanks.

@perry the site is https://kind-tesla-a088c1.netlify.app/
It would be good if it was possible to get support without sharing the URL for our website on a public forum…

Hi, @blerchin, you can also send us the site’s API ID or private message (PM) site details to one of our support team. However, using PMs will likely slow the response process as only one person can see the reply instead of our whole support team.

I’ve disabled Large Media for that site. Would you please let us know if there are other questions about this or more we can do to assist?

Same here: please remove Large Media add-on from my site:
API ID: fd990733-c38e-4165-8715-024a2c00593e

While searching for a solution to get netlify to do git lfs fetch ( GIT_LFS_ENABLED would have been it ) I was misguided by the docs (and google search) into setting up Large Media. Yikes.

Hi, @atteneder. We have removed the Large Media add-on from this site.

Would you please push the commit removing .lfsconfig to the upstream repository? This will trigger a new build.

Please let us know if there are any issues with the new build or deployed site.

Thanks for reminding, but I already removed the .lfsconfig file before. First deploy failed. After I couldn’t find the problem I triggered another deploy and cleared the cache and then it worked.

Thanks!

I’ve also fallen into the trap of enabling Large Media add-on temporarily and would like to remove it from my site. Everything is backed up properly in Github LFS and i’ve removed the .lfsconfig file. Can you do what you need to do to remove the add on fro my site ( stoic-wing-94004f ).

Thanks!

Hi, @jamestomasino. We have removed the Large Media add-on from this site.

Would you please push the commit removing .lfsconfig to the upstream repository? (Or trigger a build in some way if you have already done so?)

Please let us know if there are any issues with the new build or deployed site.