diff --git a/docs/configuration.rst b/docs/configuration.rst index 05f86144b..e27fa80f2 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -66,13 +66,13 @@ configuration file (**Note: this is not advisable**): Unfortunately, this configuration lives in your Git repository along with your source code, and this would represent insecure management of your password. It is recommended to use an environment variable to provide the required password. Suppose you would -like to specify that should be read from the environment variable ``GH_TOKEN``. +like to specify that should be read from the environment variable ``GH_TOKEN``. In this case, you should modify your configuration to the following: .. code-block:: toml [tool.semantic_release.remote] - password = { env = "GH_TOKEN" } + token = { env = "GH_TOKEN" } This is equivalent to the default: diff --git a/semantic_release/cli/config.py b/semantic_release/cli/config.py index dd881bc9b..63cee6c1f 100644 --- a/semantic_release/cli/config.py +++ b/semantic_release/cli/config.py @@ -327,7 +327,7 @@ def from_raw_config( ) token = cls.resolve_from_env(raw.remote.token) - if isinstance(raw.remote.token, EnvConfigVar) and not token: + if isinstance(raw.remote.token, EnvConfigVar) and not raw.remote.ignore_token_for_push and not token: log.warning( "the token for the remote VCS is configured as stored in the %s environment variable, but it is empty", raw.remote.token.env,