deploy: use reliable HTTPS transport for Gitea sync
This commit is contained in:
@@ -6,7 +6,7 @@ root=${MINABOT_DEPLOY_ROOT:-/opt/minabot}
|
||||
cd "$root"
|
||||
exec 9>deploy.lock
|
||||
flock -n 9 || exit 0
|
||||
export GIT_SSH_COMMAND="ssh -i $root/git-auth/id_ed25519 -o IdentitiesOnly=yes -o BatchMode=yes -o StrictHostKeyChecking=yes -o UserKnownHostsFile=$root/git-auth/known_hosts -o ConnectTimeout=10 -o ServerAliveInterval=15 -o ServerAliveCountMax=2"
|
||||
export GIT_TERMINAL_PROMPT=0
|
||||
repo="$root/git-sync.git"
|
||||
target=''
|
||||
switching=false
|
||||
@@ -53,7 +53,7 @@ trap failed ERR
|
||||
|
||||
if [[ ! -d "$repo" ]]; then
|
||||
git init --bare "$repo"
|
||||
git --git-dir="$repo" remote add origin git@git.ayau.me:syntaxbullet/minabot.git
|
||||
git --git-dir="$repo" remote add origin https://git.ayau.me/syntaxbullet/minabot.git
|
||||
fi
|
||||
timeout 90 git --git-dir="$repo" fetch --quiet origin +refs/heads/main:refs/remotes/origin/main
|
||||
target=$(git --git-dir="$repo" rev-parse refs/remotes/origin/main)
|
||||
|
||||
Reference in New Issue
Block a user