summaryrefslogtreecommitdiff
path: root/docs/cli-usage.rst
diff options
context:
space:
mode:
authorNejc Habjan <hab.nejc@gmail.com>2021-12-12 19:19:45 +0100
committerNejc Habjan <hab.nejc@gmail.com>2021-12-13 01:11:15 +0100
commit92a893b8e230718436582dcad96175685425b1df (patch)
treeabfa0a78a5bb5429cd0a7bbe28e58e665737e511 /docs/cli-usage.rst
parentaf33affa4888fa83c31557ae99d7bbd877e9a605 (diff)
downloadgitlab-feat/cli-without-config-file.tar.gz
feat(cli): do not require config file to run CLIfeat/cli-without-config-file
BREAKING CHANGE: A config file is no longer needed to run the CLI. python-gitlab will default to https://gitlab.com with no authentication if there is no config file provided. python-gitlab will now also only look for configuration in the provided PYTHON_GITLAB_CFG path, instead of merging it with user- and system-wide config files. If the environment variable is defined and the file cannot be opened, python-gitlab will now explicitly fail.
Diffstat (limited to 'docs/cli-usage.rst')
-rw-r--r--docs/cli-usage.rst14
1 files changed, 11 insertions, 3 deletions
diff --git a/docs/cli-usage.rst b/docs/cli-usage.rst
index ea10f93..50fac6d 100644
--- a/docs/cli-usage.rst
+++ b/docs/cli-usage.rst
@@ -4,7 +4,8 @@
``python-gitlab`` provides a :command:`gitlab` command-line tool to interact
with GitLab servers. It uses a configuration file to define how to connect to
-the servers.
+the servers. Without a configuration file, ``gitlab`` will default to
+https://gitlab.com and unauthenticated requests.
.. _cli_configuration:
@@ -16,8 +17,8 @@ Files
``gitlab`` looks up 3 configuration files by default:
-``PYTHON_GITLAB_CFG`` environment variable
- An environment variable that contains the path to a configuration file
+The ``PYTHON_GITLAB_CFG`` environment variable
+ An environment variable that contains the path to a configuration file.
``/etc/python-gitlab.cfg``
System-wide configuration file
@@ -27,6 +28,13 @@ Files
You can use a different configuration file with the ``--config-file`` option.
+.. warning::
+ If the ``PYTHON_GITLAB_CFG`` environment variable is defined and the target
+ file exists, it will be the only configuration file parsed by ``gitlab``.
+
+ If the environment variable is defined and the target file cannot be accessed,
+ ``gitlab`` will fail explicitly.
+
Content
-------