diff options
author | James Ramsay <james@jramsay.com.au> | 2018-04-20 15:29:19 +0300 |
---|---|---|
committer | James Ramsay <james@jramsay.com.au> | 2018-04-24 14:25:28 +0300 |
commit | faa7ff3ee116656c93d912ef24c36fe6acc7994d (patch) | |
tree | efa644bdcae2c244d0eb7c69848cd1de8b3b71ca /doc/workflow | |
parent | 87e592dc0a81d94efac157dfd7382df4e5b2a223 (diff) |
Document externally hosted LFS objects
API can be used by project owners to disable LFS object verification
that will block pushes that contain LFS pointers but no the objects.
Diffstat (limited to 'doc/workflow')
-rw-r--r-- | doc/workflow/lfs/manage_large_binaries_with_git_lfs.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md b/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md index 377eee69c11..104ac0cf31b 100644 --- a/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md +++ b/doc/workflow/lfs/manage_large_binaries_with_git_lfs.md @@ -244,3 +244,20 @@ GitLab checks files to detect LFS pointers on push. If LFS pointers are detected Verify that LFS in installed locally and consider a manual push with `git lfs push --all`. If you are storing LFS files outside of GitLab you can disable LFS on the project by settting `lfs_enabled: false` with the [projects api](../../api/projects.md#edit-project). + +### Hosting LFS objects externally + +It is possible to host LFS objects externally by setting a custom LFS url with `git config -f .lfsconfig lfs.url https://example.com/<project>.git/info/lfs`. + +Because GitLab verifies the existence of objects referenced by LFS pointers, push will fail when LFS is enabled for the project. + +LFS can be disabled for a project by Owners and Masters using the [Project API](../../api/projects.md#edit-project). + +```bash +curl --request PUT \ + --url https://example.com/api/v4/projects/<PROJECT_ID> \ + --header 'Private-Token: <YOUR_PRIVATE_TOKEN>' \ + --data 'lfs_enabled=false' +``` + +Note, `<PROJECT_ID>` can also be substituted with a [namespaced path](../../api/README.md#namespaced-path-encoding). |