Locking Not Supported
Git LFS file locking is not supported on this server - git lfs lock, locks and unlock fail on git.eu.
LFS File Locking Not Supported
Symptom
Every Git LFS lock command fails:
Locking test.psd failed: Git LFS file locking is not supported on this server
Error while retrieving locks: Git LFS file locking is not supported on this server
unable to get lock ID: Git LFS file locking is not supported on this server
The first comes from git lfs lock, the second from git lfs locks, the third from git lfs unlock.
Cause
git.eu does not support Git LFS file locking yet: the server answers every lock request with HTTP 501 (Not Implemented). Storing, pushing and downloading LFS files work as usual.
Diagnose
Check whether a .gitattributes rule marks files as lockable (lockable files are read-only on disk until locked):
git check-attr lockable -- test.psd
test.psd: lockable: set means the rule is there; unspecified means it is not.
Fix
Option A - Remove the lockable flag (recommended)
Make the files writable again and commit the changed .gitattributes:
git lfs track --not-lockable "*.psd"
git add .gitattributes
git commit -m "Remove the lockable flag from PSD files"
git push
Option B - Coordinate edits outside git
Agree in your team on who edits which binary file, since no lock can do it for you.
Verify
git check-attr lockable -- test.psd
It prints test.psd: lockable: unspecified.
Prevent
- Do not add
lockableto.gitattributesrules for a git.eu repository.