From 969484a41369337e4d6e1f076cbe8f5d96ddb23b Mon Sep 17 00:00:00 2001 From: Proton Date: Tue, 17 Dec 2024 15:03:00 +0800 Subject: [PATCH] [ci] Try GITHUB_TOKEN --- .github/workflows/scripts/common-utils.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/scripts/common-utils.sh b/.github/workflows/scripts/common-utils.sh index ff77d1cb1a8f5..748b379f4c2c6 100644 --- a/.github/workflows/scripts/common-utils.sh +++ b/.github/workflows/scripts/common-utils.sh @@ -5,16 +5,18 @@ set -x function unset-git-caching-proxy { echo "Unsetting git caching proxy" git config --global --unset-all url.http://git-cdn-github.botmaster.tgr/.insteadOf || true - git config --global --unset-all url.http://git-cdn-gitlab.botmaster.tgr/.insteadOf || true + # git config --global --unset-all url.http://git-cdn-gitlab.botmaster.tgr/.insteadOf || true + rm -f ~/.git-credentials } function set-git-caching-proxy { - return # Disable git caching proxy, modified git-cdn image is lost trap unset-git-caching-proxy EXIT echo "Setting git caching proxy" git config --global --add url.http://git-cdn-github.botmaster.tgr/.insteadOf https://github.com/ git config --global --add url.http://git-cdn-github.botmaster.tgr/.insteadOf git@github.com: - git config --global --add url.http://git-cdn-gitlab.botmaster.tgr/.insteadOf https://gitlab.com/ + # git config --global --add url.http://git-cdn-gitlab.botmaster.tgr/.insteadOf https://gitlab.com/ + git config --global credentials.helper store + echo "http://oauth2:$GITHUB_TOKEN@git-cdn-github.botmaster.tgr" > ~/.git-credentials } if [ ! -z "$TI_USE_GIT_CACHE" ]; then