feat: add git:auth-status to check netrc match

Adds `git:auth-status HOST [USERNAME] [PASSWORD]` which exits 0 when the
configured `.netrc` entry matches the requested state and 1 otherwise,
allowing external tooling to detect whether `git:auth` would change
anything without reading `$DOKKU_ROOT/.netrc` directly. Both `git:auth`
and `git:auth-status` now also accept the password via `STDIN`.
This commit is contained in:
Jose Diaz-Gonzalez
2026-04-26 23:10:30 -04:00
parent ad00918891
commit 65bdbefbea
5 changed files with 139 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
source "$PLUGIN_AVAILABLE_PATH/git/internal-functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
cmd-git-auth-status "$@"