bf9395e022
CI / license-header (push) Has been skipped
CI / e2e-dry-run (push) Has been skipped
CI / fast-gate (push) Failing after 0s
Test PR Label Logic / test-pr-labels (push) Failing after 1s
Skill Format Check / check-format (push) Failing after 2s
CI / security (push) Failing after 5s
CI / unit-test (push) Has been skipped
CI / lint (push) Has been skipped
CI / script-test (push) Has been skipped
CI / deterministic-gate (push) Has been skipped
CI / coverage (push) Has been skipped
CI / results (push) Has been cancelled
CI / deadcode (push) Has been cancelled
CI / e2e-live (push) Has been cancelled
1.8 KiB
1.8 KiB
apps Git credential
妙搭 Git 凭证用于本地原生 git clone/pull/push。运行时命令事实以 lark-cli apps +git-credential-init --help、+git-credential-list --help、+git-credential-remove --help 为准。
命令
lark-cli apps +git-credential-init --app-id app_xxx
lark-cli apps +git-credential-list
lark-cli apps +git-credential-remove --app-id app_xxx
输出契约
+git-credential-init成功后读取data.repository_url;不要展示或保存其中的凭据细节,只用于下一步git clone。+git-credential-list返回本地记录和状态;可用来判断是否需要重新 init。+git-credential-remove只清本地配置;成功后告知不会删除云端应用或仓库。
行为规则
+git-credential-init返回repository_url,并配置 URL-scoped Git credential helper。后续 clone/pull/push 使用原生 git。+git-credential-list列出本地已配置的妙搭 Git 凭证,不需要--app-id。+git-credential-remove只移除本地凭证/helper,不删除云端应用或仓库。- 看到 Repository URL 后继续:
git clone <repository_url>
cd <repo>
git checkout sprint/default
Agent 规则
- 不要手动打印、保存或拼接 token。
- clone、pull、push、diff、log 等代码仓库操作都使用原生
git;不存在apps +pull/apps +push/apps code +read这类代码读写 shortcut,不要臆造。 - 不要 push/force-push
main;main是发布态快照,由apps +release-create成功后服务端推进,直推/force-push 会被服务端护栏拒绝。 - Git 认证失败、本地凭证损坏或 helper 缺失时,重新执行
+git-credential-init --app-id <id>覆盖本地配置;不要让用户复制 token 到 remote URL。