| 1 |
.. _configuration: |
| 2 |
|
| 3 |
Configuration |
| 4 |
************* |
| 5 |
|
| 6 |
DataLad uses the same configuration mechanism and syntax as Git itself. |
| 7 |
Consequently, datalad can be configured using the :command:`git config` |
| 8 |
command. Both a *global* user configuration (typically at |
| 9 |
:file:`~/.gitconfig`), and a *local* repository-specific configuration |
| 10 |
(:file:`.git/config`) are inspected. |
| 11 |
|
| 12 |
In addition, datalad supports a persistent dataset-specific configuration. |
| 13 |
This configuration is stored at :file:`.datalad/config` in any dataset. As it |
| 14 |
is part of a dataset, settings stored there will also be in effect for any |
| 15 |
consumer of such a dataset. Both *global* and *local* settings on a particular |
| 16 |
machine always override configuration shipped with a dataset. |
| 17 |
|
| 18 |
All datalad-specific configuration variables are prefixed with ``datalad.``. |
| 19 |
|
| 20 |
It is possible to override or amend the configuration using environment |
| 21 |
variables. Any variable with a name that starts with ``DATALAD_`` will |
| 22 |
be available as the corresponding ``datalad.`` configuration variable, |
| 23 |
replacing any ``__`` (two underscores) with a hyphen, then any ``_`` |
| 24 |
(single underscore) with a dot, and finally converting all letters to |
| 25 |
lower case. Values from environment variables take precedence over |
| 26 |
configuration file settings. |
| 27 |
|
| 28 |
In addition, the ``DATALAD_CONFIG_OVERRIDES_JSON`` environment variable can |
| 29 |
be set to a JSON record with configuration values. This is |
| 30 |
particularly useful for options that aren't accessible through the |
| 31 |
naming scheme described above (e.g., an option name that includes an |
| 32 |
underscore). |
| 33 |
|
| 34 |
The following sections provide a (non-exhaustive) list of settings honored |
| 35 |
by datalad. They are categorized according to the scope they are typically |
| 36 |
associated with. |
| 37 |
|
| 38 |
|
| 39 |
Global user configuration |
| 40 |
========================= |
| 41 |
|
| 42 |
.. include:: generated/cfginfo/global.rst.in |
| 43 |
|
| 44 |
Local repository configuration |
| 45 |
============================== |
| 46 |
|
| 47 |
.. include:: generated/cfginfo/local.rst.in |
| 48 |
|
| 49 |
Sticky dataset configuration |
| 50 |
============================= |
| 51 |
|
| 52 |
.. include:: generated/cfginfo/dataset.rst.in |
| 53 |
|
| 54 |
Miscellaneous configuration |
| 55 |
=========================== |
| 56 |
|
| 57 |
.. include:: generated/cfginfo/misc.rst.in |