diff --git a/scripts/setup/officer-setup/lib/repo.sh b/scripts/setup/officer-setup/lib/repo.sh index 171e3846..5379d19b 100644 --- a/scripts/setup/officer-setup/lib/repo.sh +++ b/scripts/setup/officer-setup/lib/repo.sh @@ -14,7 +14,17 @@ [[ -n "${OFFICER_SETUP_REPO_LOADED:-}" ]] && return 0 OFFICER_SETUP_REPO_LOADED=1 -OFFICER_REPO="${OFFICER_REPO:-https://gitea.pastilhas.dev/officerdev/platform.git}" +# SSH rather than HTTPS, temporarily: the repository is private, and an HTTPS +# clone of a private repo prompts for a username — which under sudo, with no +# interactive terminal, hangs or dies with "could not read Username". +# +# The clone runs as the OWNER, not as root (see the note above), so it uses their +# ~/.ssh key. A passphrase-protected key normally answered by ssh-agent will not +# work here: sudo drops SSH_AUTH_SOCK, so there is no agent to ask. An unencrypted +# key, or one already accepted by the host, is what this expects. +# +# Back to HTTPS when the repository is public — nothing else here cares which. +OFFICER_REPO="${OFFICER_REPO:-ssh://git@gitea.pastilhas.dev:2222/officerdev/platform.git}" platform_dir() { echo "${OFFICER_ROOT}/platform"; }