diff --git a/install.sh b/install.sh index b9cff9c..6fc047d 100755 --- a/install.sh +++ b/install.sh @@ -10,8 +10,15 @@ if [ -d "tlbm-mcp" ]; then git pull else echo "📥 克隆仓库..." - git clone https://git.atomdancing.com/AtomDancing/tlbm-mcp.git - cd tlbm-mcp + # 先尝试公开克隆,失败则提示登录 + if git clone https://git.atomdancing.com/AtomDancing/tlbm-mcp.git 2>/dev/null; then + cd tlbm-mcp + else + echo "⚠️ 仓库需要登录,请输入 Gitea 用户名:" + read -r username + git clone "https://${username}@git.atomdancing.com/AtomDancing/tlbm-mcp.git" + cd tlbm-mcp + fi fi echo "📦 安装依赖..."