Skip to content

Commit 9b6b57b

Browse files
committed
docs/man: suggest using Git configuration for LFS keys
The documentation suggests using .lfsconfig in the repository root for configuration keys. Only a small number of keys can be set in this file for security reasons, but we don't mention this until the end of the file, which means that users often don't notice this fact, leading to confusion when it doesn't work. Instead, suggest primarily using the Git configuration files for storing this data, since that will always work. State that users can use .lfsconfig, but tell them up front that it is restricted to a small number of keys, and point them farther down the page where they can find that information. Indicate to users that this restriction is for security reasons to help them better understand the rationale.
1 parent c0c2eec commit 9b6b57b

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

docs/man/git-lfs-config.5.ronn

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,18 @@ git-lfs-config(5) -- Configuration options for git-lfs
33

44
## CONFIGURATION FILES
55

6-
git-lfs reads its configuration from a file called `.lfsconfig` at the root of
7-
the repository. The `.lfsconfig` file uses the same format as `.gitconfig`.
6+
git-lfs reads its configuration from any file supported by `git config -l`,
7+
including all per-repository, per-user, and per-system Git configuration files.
88

9-
Additionally, all settings can be overridden by values returned by `git config -l`.
10-
This allows you to override settings like `lfs.url` in your local environment
11-
without having to modify the `.lfsconfig` file.
9+
Additionally, a small number of settings can be specified in a file called
10+
`.lfsconfig` at the root of the repository; see the "LFSCONFIG" section for more
11+
details. This configuration file is useful for setting options such as the LFS
12+
URL or access type for all users of a repository, especially when these differ
13+
from the default. The `.lfsconfig` file uses the same format as `.gitconfig`.
14+
15+
Settings from Git configuration files override the `.lfsconfig` file. This
16+
allows you to override settings like `lfs.url` in your local environment without
17+
having to modify the `.lfsconfig` file.
1218

1319
Most options regarding git-lfs are contained in the `[lfs]` section, meaning
1420
they are all named `lfs.foo` or similar, although occasionally an lfs option can
@@ -350,6 +356,8 @@ including and limited to:
350356
- remote.{name}.lfsurl
351357
- remote.{name}.{*}.access
352358

359+
The set of keys allowed in this file is restricted for security reasons.
360+
353361
## EXAMPLES
354362

355363
* Configure a custom LFS endpoint for your repository:

0 commit comments

Comments
 (0)