From e97f278390c8adc09c58347c64484eb4e3b5913d Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Sun, 5 Apr 2026 14:48:08 +0400 Subject: [PATCH] fix: remap submodule to Forgejo SSH URL for CI clone Use ssh://git@git.tbs.amn.gg:2222/ instead of HTTPS token auth which gets 403 on cross-repo access. Co-Authored-By: Claude Opus 4.6 (1M context) --- .gitea/workflows/build.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 60aa13d..74cc0c3 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -27,7 +27,9 @@ jobs: AUTH_URL="${{ github.server_url }}/${{ github.repository }}.git" AUTH_URL=$(echo "$AUTH_URL" | sed "s|://|://${{ github.token }}@|") git clone --depth 1 --branch ${{ github.ref_name }} "$AUTH_URL" . - git config --global url."https://${{ github.token }}@git.tbs.amn.gg/".insteadOf "ssh://git@git.manko.yoga:222/" + apt-get install -y openssh-client + mkdir -p ~/.ssh && ssh-keyscan -p 2222 git.tbs.amn.gg >> ~/.ssh/known_hosts 2>/dev/null + git config --global url."ssh://git@git.tbs.amn.gg:2222/manawenuz/".insteadOf "ssh://git@git.manko.yoga:222/manawenuz/" git submodule update --init --depth 1 - name: Install Rust and dependencies @@ -81,7 +83,9 @@ jobs: AUTH_URL="${{ github.server_url }}/${{ github.repository }}.git" AUTH_URL=$(echo "$AUTH_URL" | sed "s|://|://${{ github.token }}@|") git clone --depth 1 --branch ${{ github.ref_name }} "$AUTH_URL" . - git config --global url."https://${{ github.token }}@git.tbs.amn.gg/".insteadOf "ssh://git@git.manko.yoga:222/" + apt-get install -y openssh-client + mkdir -p ~/.ssh && ssh-keyscan -p 2222 git.tbs.amn.gg >> ~/.ssh/known_hosts 2>/dev/null + git config --global url."ssh://git@git.tbs.amn.gg:2222/manawenuz/".insteadOf "ssh://git@git.manko.yoga:222/manawenuz/" git submodule update --init --depth 1 - name: Install Rust and cross-compilation tools @@ -130,7 +134,9 @@ jobs: AUTH_URL="${{ github.server_url }}/${{ github.repository }}.git" AUTH_URL=$(echo "$AUTH_URL" | sed "s|://|://${{ github.token }}@|") git clone --depth 1 --branch ${{ github.ref_name }} "$AUTH_URL" . - git config --global url."https://${{ github.token }}@git.tbs.amn.gg/".insteadOf "ssh://git@git.manko.yoga:222/" + apt-get install -y openssh-client + mkdir -p ~/.ssh && ssh-keyscan -p 2222 git.tbs.amn.gg >> ~/.ssh/known_hosts 2>/dev/null + git config --global url."ssh://git@git.tbs.amn.gg:2222/manawenuz/".insteadOf "ssh://git@git.manko.yoga:222/manawenuz/" git submodule update --init --depth 1 - name: Install Rust and cross-compilation tools