From e13114c65715ae37210932686ee76807b342284a Mon Sep 17 00:00:00 2001 From: anurag Date: Tue, 10 Nov 2026 19:25:25 +0000 Subject: [PATCH 1/3] not use password Signed-off-by: anurag --- .github/workflows/mirror-enterprise.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/mirror-enterprise.yml b/.github/workflows/mirror-enterprise.yml index 30c4423..8fb9e8e 100644 --- a/.github/workflows/mirror-enterprise.yml +++ b/.github/workflows/mirror-enterprise.yml @@ -27,11 +27,12 @@ jobs: GIT_TERMINAL_PROMPT: "0" GIT_MERGE_AUTOEDIT: "no" run: | - # Send the username and token together. Answering only the password - # prompt can pair the token with the saved login name. - cred='!f() { echo username=x-access-token; echo "password=$ENTERPRISE_TOKEN"; }; f' - git -c credential.helper= -c "credential.helper=$cred" \ - clone https://gitenterprise.xilinx.com/XDP/MLDebug.git "$RUNNER_TEMP/MLDebug" + # x-access-token plus the PAT is a complete HTTPS credential, so git + # does not ask for a username or password. Clearing credential.helper + # keeps the runner's saved enterprise login out of this request. + remote="https://x-access-token:${ENTERPRISE_TOKEN}@gitenterprise.xilinx.com/XDP/MLDebug.git" + git -c credential.helper= clone "$remote" "$RUNNER_TEMP/MLDebug" cd "$RUNNER_TEMP/MLDebug" + git remote set-url origin https://gitenterprise.xilinx.com/XDP/MLDebug.git git pull --no-rebase https://github.com/Xilinx/MLDebugger.git main - git -c credential.helper= -c "credential.helper=$cred" push origin main + git -c credential.helper= push "$remote" main From 0145a6f033704e78d693ba7891e6969770234d86 Mon Sep 17 00:00:00 2001 From: anurag Date: Tue, 10 Nov 2026 19:29:32 +0000 Subject: [PATCH 2/3] check error Signed-off-by: anurag --- .github/workflows/mirror-enterprise.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/mirror-enterprise.yml b/.github/workflows/mirror-enterprise.yml index 8fb9e8e..5004721 100644 --- a/.github/workflows/mirror-enterprise.yml +++ b/.github/workflows/mirror-enterprise.yml @@ -21,6 +21,16 @@ jobs: fetch-depth: 0 persist-credentials: false + - name: Debug token + env: + ENTERPRISE_TOKEN: ${{ secrets.MLDEBUG_ENTERPRISE_TOKEN }} + run: | + echo "token length: ${#ENTERPRISE_TOKEN}" + curl -s -o /dev/null -w "%{http_code}\n" \ + -H "Authorization: token ${ENTERPRISE_TOKEN}" \ + https://gitenterprise.xilinx.com/api/v3/user + git config --show-origin --get-regexp 'http\.|url\.|credential' || true + - name: Push main to enterprise env: ENTERPRISE_TOKEN: ${{ secrets.MLDEBUG_ENTERPRISE_TOKEN }} From 1d4b83a4408f2bcf98b1a258decabd1e7f3c446a Mon Sep 17 00:00:00 2001 From: anurag Date: Tue, 10 Nov 2026 20:10:04 +0000 Subject: [PATCH 3/3] remove temp Signed-off-by: anurag --- .github/workflows/mirror-enterprise.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/mirror-enterprise.yml b/.github/workflows/mirror-enterprise.yml index 5004721..8fb9e8e 100644 --- a/.github/workflows/mirror-enterprise.yml +++ b/.github/workflows/mirror-enterprise.yml @@ -21,16 +21,6 @@ jobs: fetch-depth: 0 persist-credentials: false - - name: Debug token - env: - ENTERPRISE_TOKEN: ${{ secrets.MLDEBUG_ENTERPRISE_TOKEN }} - run: | - echo "token length: ${#ENTERPRISE_TOKEN}" - curl -s -o /dev/null -w "%{http_code}\n" \ - -H "Authorization: token ${ENTERPRISE_TOKEN}" \ - https://gitenterprise.xilinx.com/api/v3/user - git config --show-origin --get-regexp 'http\.|url\.|credential' || true - - name: Push main to enterprise env: ENTERPRISE_TOKEN: ${{ secrets.MLDEBUG_ENTERPRISE_TOKEN }}