mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
17 lines
642 B
Bash
17 lines
642 B
Bash
#!/bin/bash
|
|||
|
|
set -euo pipefail
|
||
|
|
|
||
|
|
# Match desktop's URL-scoped git credential configuration without installing a
|
||
|
|
# helper globally (which would make it answer for unrelated remotes).
|
||
|
|
if [[ -n "${BUZZ_RELAY_URL:-}" ]]; then
|
||
|
|
relay_http_url="${BUZZ_RELAY_URL/#ws:/http:}"
|
||
|
|
relay_http_url="${relay_http_url/#wss:/https:}"
|
||
|
|
relay_http_url="${relay_http_url%/}"
|
||
|
|
git config --global "credential.${relay_http_url}/git.helper" \
|
||
|
|
/usr/local/bin/git-credential-nostr
|
||
|
|
git config --global "credential.${relay_http_url}/git.useHttpPath" true
|
||
|
|
fi
|
||
|
|
|
||
|
|
# The harness must receive Kubernetes' termination signal directly.
|
||
|
|
exec buzz-acp "$@"
|