From 904d5b73e267f64aa1fb42c98d9b4ff117b598de Mon Sep 17 00:00:00 2001 From: Jacob Hummer Date: Tue, 14 Nov 2023 20:31:46 +0000 Subject: [PATCH] back to this --- .github/workflows/test-action.yml | 4 ---- src/main.ts | 5 +++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-action.yml b/.github/workflows/test-action.yml index 894e684..af9b784 100644 --- a/.github/workflows/test-action.yml +++ b/.github/workflows/test-action.yml @@ -38,9 +38,5 @@ jobs: - shell: jq -C . {0} run: ${{ toJSON(steps.main.outputs) }} - run: git config --list --show-origin - working-directory: ${{ runner.temp }} - - if: runner.debug - run: git config --list --show-origin | base64 - working-directory: ${{ runner.temp }} - run: git clone https://github.com/actions4git/setup-git.git working-directory: ${{ runner.temp }} diff --git a/src/main.ts b/src/main.ts index e29259f..f2c335d 100644 --- a/src/main.ts +++ b/src/main.ts @@ -62,6 +62,11 @@ if (userName && userEmail) { if (githubToken && githubServerURL) { const prefix = new URL(githubServerURL).origin + "/"; + const basicAuth = Buffer.from( + `x-access-token:${githubToken}`, + "utf8" + ).toString("base64"); + core.setSecret(basicAuth); await $({ stdio: "inherit", })`git config --global http.${prefix}.extraheader ${`AUTHORIZATION: basic ${githubToken}`}`;