19 lines
378 B
Bash
19 lines
378 B
Bash
#!/bin/bash
|
|
#
|
|
# GIT_ASKPASS helper for Forgejo HTTP authentication.
|
|
# Git invokes this script when it needs a username or password.
|
|
#
|
|
|
|
set -eu
|
|
|
|
# Load environment variables
|
|
. "${HOME}/.config/knowledge-genome.env"
|
|
|
|
case "${1:-}" in
|
|
*[Uu]sername*)
|
|
printf '%s\n' "${FORGEJO_USER:-n8n-bot}"
|
|
;;
|
|
*)
|
|
printf '%s\n' "${FORGEJO_TOKEN:?FORGEJO_TOKEN not set}"
|
|
;;
|
|
esac
|