diff --git a/docs/cloud-setup-script.sh b/docs/cloud-setup-script.sh index fa3a602..2f147c6 100644 --- a/docs/cloud-setup-script.sh +++ b/docs/cloud-setup-script.sh @@ -43,7 +43,10 @@ git config --system url."https://claude-code:${GITEA_TOKEN_CLAUDE_CODE}@git.uncl # 這一步是 2026-08-20 事故的直接產物:舊版設完就結束,token 沒生效也不出聲, # 於是雲端 session 開起來才發現 marketplace 拉不下來,而 setup log 一片綠。 echo "── 驗證 git 認證 ──" -if GIT_TERMINAL_PROMPT=0 git ls-remote https://git.uncle6.me/inkstone/ISEP.git >/dev/null 2>&1; then +# 加 timeout:2026-08-21 本機隔離測試時 ls-remote 掛住近 4 分鐘不回, +# 而「掛住」比「失敗」更糟——setup 會卡在那裡,看起來像還在跑。 +if command -v timeout >/dev/null 2>&1; then TO="timeout 45"; else TO=""; fi +if GIT_TERMINAL_PROMPT=0 $TO git ls-remote https://git.uncle6.me/inkstone/ISEP.git >/dev/null 2>&1; then echo "✅ git 認證通:拉得到 inkstone/ISEP" else echo "❌ git 認證不通——marketplace 一定裝不起來,後面不用往下做了。" >&2