1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-11-16 18:48:19 +01:00

Improve git-obs to read credentials from env variables

Supported variables:
- GIT_OBS_GITEA_URL (mandatory)
- GIT_OBS_GITEA_USER (mandatory)
- GIT_OBS_GITEA_TOKEN (mandatory)
- GIT_OBS_GITEA_SSH_KEY (optional)
This commit is contained in:
2025-05-05 14:00:50 +02:00
parent 04a02377ab
commit a380dc8624
2 changed files with 24 additions and 1 deletions

View File

@@ -184,7 +184,11 @@ class GitObsMainCommand(osc.commandline_common.MainCommand):
self.add_argument(
"-G",
"--gitea-login",
help="Name of the login entry in the config file. Default: $GIT_OBS_LOGIN or the default entry from the config file.",
help=(
"Name of the login entry in the config file. Default: $GIT_OBS_LOGIN or the default entry from the config file. "
"Alternatively, you can omit this argument and set GIT_OBS_GITEA_URL, GIT_OBS_GITEA_USER, and GIT_OBS_GITEA_TOKEN environmental variables instead. "
"Optional variables: GIT_OBS_GITEA_SSH_KEY"
),
).completer = complete_login
def post_parse_args(self, args):