# Git lfs error for app

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgit-lfs-error-for-app%2F28562%3E%5C
**Category:** Beginners\
**Created:** [December 28, 2022, 5:10pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgit-lfs-error-for-app%2F28562 "2022-12-28T17:10:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![quantumiracle-git](https://avatars.discourse-cdn.com/v4/letter/q/e47774/32.png) [@quantumiracle-git](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fquantumiracle-git)%5C
**Post date:** [December 28, 2022, 5:10pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgit-lfs-error-for-app%2F28562%2F1 "2022-12-28T17:10:02Z")

</div>

Hi,  
I’m using a repo to build App on HF, but when it runs it always report the following error:

```auto
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/repository.py", line 742, in clone_from
    run_subprocess("git lfs install", self.local_dir)
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/utils/_subprocess.py", line 61, in run_subprocess
    return subprocess.run(
  File "/usr/local/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['git', 'lfs', 'install']' returned non-zero exit status 2.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "app.py", line 349, in 
    demo = build_interface()
  File "app.py", line 335, in build_interface
    callback.setup([user_choice, left, right], "flagged_data_points")
  File "/home/user/app/hfserver.py", line 342, in setup
    self.repo = huggingface_hub.Repository(
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/utils/_deprecation.py", line 101, in inner_f
    return f(*args, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 124, in _inner_fn
    return fn(*args, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/repository.py", line 528, in __init__
    self.clone_from(repo_url=clone_from)
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 124, in _inner_fn
    return fn(*args, **kwargs)
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/repository.py", line 797, in clone_from
    raise EnvironmentError(exc.stderr)
OSError: Hook already exists: post-checkout

	#!/bin/sh
	command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting '.git/hooks/post-checkout'.\n"; exit 2; }
	git lfs post-checkout "$@"

To resolve this, either:
  1: run `git lfs update --manual` for instructions on how to merge hooks.
  2: run `git lfs update --force` to overwrite your hook.

```

Any idea on how to solve this?

Thx

---

<div class="post-metadata">

**Author:** ![Jean-Baptiste](https://avatars.discourse-cdn.com/v4/letter/j/7c8e57/32.png) [@Jean-Baptiste](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2FJean-Baptiste)%5C
**Post date:** [January 13, 2023, 3:05pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgit-lfs-error-for-app%2F28562%2F2 "2023-01-13T15:05:59Z")

</div>

Hello,

I have the exact same issue with my space. Did you find a solution ?

Thanks,  
Jean-Baptiste

---

<div class="post-metadata">

**Author:** ![quantumiracle-git](https://avatars.discourse-cdn.com/v4/letter/q/e47774/32.png) [@quantumiracle-git](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fquantumiracle-git)%5C
**Post date:** [January 13, 2023, 3:52pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fgit-lfs-error-for-app%2F28562%2F3 "2023-01-13T15:52:31Z")

</div>

No solution on this for now. I just use my own server instead of HF server to build the app.
