init: seed framework reference content from agent-runtimes main repo

This commit is contained in:
Paul O'Reilly
2026-04-26 12:17:42 +12:00
commit 37a5165dfb
118 changed files with 6831 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
#!/bin/bash
# Configure git to use GITEA_TOKEN for HTTPS cloning/pushing to gitea.oreillyit.nz
#
# Uses a credential helper script that reads the token from the environment.
# This avoids embedding the token in clone URLs (which would appear in logs).
set -euo pipefail
CRED_HELPER="/opt/harness/contexts/gitea-https/v1/git-credential-gitea.sh"
# Create the credential helper script
cat > "$CRED_HELPER" << 'HELPER_EOF'
#!/bin/bash
# Git credential helper that provides GITEA_TOKEN for gitea.oreillyit.nz
if [ -z "${GITEA_TOKEN:-}" ]; then
exit 1
fi
echo "protocol=https"
echo "host=gitea.oreillyit.nz"
echo "username=token"
echo "password=${GITEA_TOKEN}"
HELPER_EOF
chmod +x "$CRED_HELPER"
# Configure git to use this credential helper for gitea.oreillyit.nz
git config --global credential.https://gitea.oreillyit.nz.helper "$CRED_HELPER"
echo "Git HTTPS credential helper configured for gitea.oreillyit.nz"