Explain git/git-lfs workaround in README
git introduced some new security measures, which disable post-checkout hooks by default. Since post-checkout hooks are used by git-lfs to download the large files, this causes error messages to be printed at clone time. As a result, we have updated the README to describe how to fix repositories when this happens. See #104 for more info.
This commit is contained in:
parent
824c6982a9
commit
a38be96910
34
README.md
34
README.md
|
@ -48,6 +48,40 @@ If the instructions don't work on your distro, or there is no match, please let
|
|||
us know! In the long term, we would like to try and support whatever
|
||||
distributions are being used - especially those that are free software.
|
||||
|
||||
#### Failures during git clone
|
||||
|
||||
When cloning the repository, you may see this message:
|
||||
|
||||
```
|
||||
fatal: active `post-checkout` hook found during `git clone`:
|
||||
/tmp/motoristic/.git/hooks/post-checkout
|
||||
For security reasons, this is disallowed by default.
|
||||
If this is intentional and the hook should actually be run, please
|
||||
run the command again with `GIT_CLONE_PROTECTION_ACTIVE=false`
|
||||
warning: Clone succeeded, but checkout failed.
|
||||
You can inspect what was checked out with 'git status'
|
||||
and retry with 'git restore --source=HEAD :/'
|
||||
```
|
||||
|
||||
If so, simply run
|
||||
|
||||
```
|
||||
cd motoristic
|
||||
git lfs pull
|
||||
```
|
||||
|
||||
and the repository will be in a good state.
|
||||
|
||||
This happens because `git-lfs`, which we use to store large files in the
|
||||
repository, works by creating a `post-checkout` hook in the repository, which
|
||||
then downloads the large files. A recent change in `git` disables
|
||||
`post-checkout` hooks from being run automatically for security reasons.
|
||||
|
||||
As of 2024-05-19, solutions are being discussed upstream. See this
|
||||
[issue](https://github.com/git-lfs/git-lfs/issues/5749) in `git-lfs` for more.
|
||||
[TODO #104](https://source.motoristic.org/motoristic/motoristic/issues/104)
|
||||
tracks this in our repository.
|
||||
|
||||
### Full development environment
|
||||
|
||||
The process for setting up a full environment is almost identical to setting up
|
||||
|
|
Loading…
Reference in a new issue