diff --git a/.github/workflows/go-ci.yml b/.github/workflows/go-ci.yml index b0d2add..7c1cb1e 100644 --- a/.github/workflows/go-ci.yml +++ b/.github/workflows/go-ci.yml @@ -63,7 +63,9 @@ jobs: GH_PAT: ${{ secrets.GH_PAT }} run: | if [ -n "$GH_PAT" ]; then - git config --global http."https://github.com/".extraHeader "Authorization: token ${GH_PAT}" + echo "GIT_CONFIG_COUNT=1" >> "$GITHUB_ENV" + echo "GIT_CONFIG_KEY_0=url.https://${GH_PAT}@github.com/.insteadOf" >> "$GITHUB_ENV" + echo "GIT_CONFIG_VALUE_0=https://github.com/" >> "$GITHUB_ENV" fi - uses: actions/setup-go@v5 @@ -108,7 +110,9 @@ jobs: GH_PAT: ${{ secrets.GH_PAT }} run: | if [ -n "$GH_PAT" ]; then - git config --global http."https://github.com/".extraHeader "Authorization: token ${GH_PAT}" + echo "GIT_CONFIG_COUNT=1" >> "$GITHUB_ENV" + echo "GIT_CONFIG_KEY_0=url.https://${GH_PAT}@github.com/.insteadOf" >> "$GITHUB_ENV" + echo "GIT_CONFIG_VALUE_0=https://github.com/" >> "$GITHUB_ENV" fi - uses: actions/setup-go@v5 @@ -147,7 +151,9 @@ jobs: GH_PAT: ${{ secrets.GH_PAT }} run: | if [ -n "$GH_PAT" ]; then - git config --global http."https://github.com/".extraHeader "Authorization: token ${GH_PAT}" + echo "GIT_CONFIG_COUNT=1" >> "$GITHUB_ENV" + echo "GIT_CONFIG_KEY_0=url.https://${GH_PAT}@github.com/.insteadOf" >> "$GITHUB_ENV" + echo "GIT_CONFIG_VALUE_0=https://github.com/" >> "$GITHUB_ENV" fi - uses: actions/setup-go@v5