[macos-runner] Guard checkout against hanging on prompts or a stalled clone
git clone froze for 9+ minutes on one run with no clear cause. Set GIT_TERMINAL_PROMPT=0 so it fails fast instead of hanging if credential auth ever goes wrong, and abort via http.lowSpeedLimit/lowSpeedTime if the transfer genuinely stalls instead of just being slow.
This commit is contained in:
@@ -24,9 +24,10 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout
|
||||
run: |
|
||||
export GIT_TERMINAL_PROMPT=0
|
||||
REPO_URL="${{ gitea.server_url }}/${{ gitea.repository }}.git"
|
||||
AUTH_URL="$(echo "$REPO_URL" | sed "s#https://#https://x-access-token:${{ gitea.token }}@#")"
|
||||
git clone "$AUTH_URL" .
|
||||
git -c http.lowSpeedLimit=1000 -c http.lowSpeedTime=30 clone "$AUTH_URL" .
|
||||
git checkout "${{ gitea.sha }}"
|
||||
|
||||
- name: Set build number
|
||||
|
||||
Reference in New Issue
Block a user