認證驗證加 timeout:掛住比失敗更糟
2026-08-21 本機隔離測試:git ls-remote 掛住近 4 分鐘不回。 setup 卡在那裡看起來像還在跑,不會有人知道它壞了。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user