[macos-runner] Disable credential helper and askpass for checkout clone

17-minute hang on git clone, far past the http.lowSpeedLimit abort
threshold, isn't explained by a data-transfer stall. Now that the VM has
a real GUI session (auto-login), git-credential-osxkeychain could be
popping a GUI dialog nobody's there to dismiss, bypassing
GIT_TERMINAL_PROMPT. Disable the credential helper and force askpass to
fail immediately instead of prompting.
This commit is contained in:
Daniel Arantes Loverde
2026-07-31 10:41:36 -03:00
parent cfa054a593
commit 28f145f392
3 changed files with 9 additions and 3 deletions

View File

@@ -25,9 +25,11 @@ jobs:
- name: Checkout - name: Checkout
run: | run: |
export GIT_TERMINAL_PROMPT=0 export GIT_TERMINAL_PROMPT=0
export GIT_ASKPASS=/bin/false
export SSH_ASKPASS=/bin/false
REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git" REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git"
AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")" AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")"
git -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" . git -c credential.helper= -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" .
git checkout "${{ gitea.sha }}" git checkout "${{ gitea.sha }}"
- name: Set build number - name: Set build number

View File

@@ -25,9 +25,11 @@ jobs:
- name: Checkout - name: Checkout
run: | run: |
export GIT_TERMINAL_PROMPT=0 export GIT_TERMINAL_PROMPT=0
export GIT_ASKPASS=/bin/false
export SSH_ASKPASS=/bin/false
REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git" REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git"
AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")" AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")"
git -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" . git -c credential.helper= -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" .
git checkout "${{ gitea.sha }}" git checkout "${{ gitea.sha }}"
- name: Verify ASC secrets - name: Verify ASC secrets

View File

@@ -20,9 +20,11 @@ jobs:
- name: Checkout - name: Checkout
run: | run: |
export GIT_TERMINAL_PROMPT=0 export GIT_TERMINAL_PROMPT=0
export GIT_ASKPASS=/bin/false
export SSH_ASKPASS=/bin/false
REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git" REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git"
AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")" AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")"
git -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" . git -c credential.helper= -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" .
git checkout "${{ gitea.sha }}" git checkout "${{ gitea.sha }}"
- name: Run unit tests - name: Run unit tests