docs: push via ensure_repository pushUrl, no user SSH
This commit is contained in:
@@ -54,14 +54,19 @@ Agent 配置示例(用户从连接中心复制,**不要**写进业务仓库
|
||||
0. whoami / get_my_quota # 可选但推荐;配额满先处理
|
||||
1. 本地:Dockerfile + 数据写 /data + .gitignore
|
||||
2. ensure_repository({ repo })
|
||||
3. git remote add/set-url + commit + push # Agent 本机企业凭据
|
||||
→ 响应含 agentHint.pushUrl(oauth2:机器人Token@gitea/...)
|
||||
3. git commit
|
||||
git push --set-upstream "<pushUrl>" HEAD:<defaultBranch>
|
||||
# 禁止:git push origin(若 origin 无 Token)
|
||||
# 禁止:要求用户配置 ~/.ssh/id_ed25519
|
||||
4. create_deployment_plan({ repo, commitSha, branch, environment, spec })
|
||||
5. apply_deployment_plan({ planId })
|
||||
6. get_deployment_status / list_projects 轮询
|
||||
7. curl 探活 apply 返回的 url(证书可能短暂签发中)
|
||||
```
|
||||
|
||||
**Push 必须在 Agent 侧做**:MCP 在服务器上读不到用户工作区未提交文件。
|
||||
**Push 必须在 Agent 侧做**:MCP 在服务器上读不到用户工作区未提交文件。
|
||||
**凭据**:仅用 `ensure_repository` 返回的 `pushUrl`(企业 `gitea-robot`),用户无 Gitea 账号/SSH 也能部署。
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user