git: host-held credentials for model-driven clone, fetch, pull and push
维护者通常 1 天内回复
@aron-cf 已经在做这个了。
开始于 2026年10月8日。
评估
这个 Issue 还没有评估数据。
描述
The model-facing git entry points, which are the worker-shell git command and ws:git (cli, clone), have no way to authenticate. Host code can pass onAuth or headers on each GitClient call. A model running git push or git clone against a private repo can't, unless it puts a token on the command line, and then the token sits in the transcript.
@cloudflare/shell in cloudflare/agents had gitTools(ws, { token }) / { auth: { username, password } }. The host held the credential and added it to clone, fetch, pull, and push, so the model never saw it. We're deprecating Shell for Computer and need the same thing.
Proposal
Add a host-side auth resolver to the git client factory:
createGitClient({
auth: (url) =>
new URL(url).host === "github.com"
? { username: "x-access-token", password: env.GITHUB_TOKEN }
: undefined,
});
clone,fetch,pull,push, andls-remotecall the resolver for every network request. That covers the typed client,git.cli, the worker-shellgitcommand, andws:git.- Auth passed explicitly on a call still wins over the resolver.
- The credential never shows up in command output, error messages,
.git/config, or remote URLs written to the repo. - The resolver takes the URL, so one workspace can hold different credentials for different hosts.
- 主要语言
- TypeScript
- 星标
- 9.5k
- 派生
- 552
- 平均合并
- 1 天 17 小时
- 30 天内合并 PR
- 50
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cloudflare/computer 的其他 Issue
-
enhancement
难度 4/5 3-5 天 新手友好度 30/100
cloudflare/computer#224 · 5 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
Always run the "next" computerd workflow on push to the `release` branch可能已有人在做 @aron-cf 于 4 天前认领。 未关闭bug
cloudflare/computer#222 · 2 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
Make just-bash and acorn optional peer dependencies, pulled in only by the backend that needs them未关闭enhancement
难度 3/5 1-2 天 新手友好度 45/100
cloudflare/computer#220 · 3 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
Workspace namespaces: more than one Workspace per Durable Object storage可能已有人在做 @aron-cf 于 5 天前认领。 未关闭enhancement
cloudflare/computer#219 · 1 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
-
Offload large files (4 MB+) to R2可能已有人在做 @aron-cf 于 5 天前认领。 未关闭enhancement
cloudflare/computer#217 · 4 条评论 · 1 个 reaction · 已指派 1 人 ·
维护者通常 1 天内回复
查看 cloudflare/computer 的全部 Issue
相似的 Issue
-
documentation good first issue hacktoberfest help wanted
难度 2/5 1-3 小时 新手友好度 78/100
libredb/libredb-studio#1756 ·
维护者通常 1 天内回复
-
state:triage-needed
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
难度 1/5 1 小时以内 新手友好度 72/100
lingdojo/kana-dojo#32365 · 1 条评论 · 5 个 reaction ·
维护者通常 1 天内回复
-
friction
难度 2/5 1-3 小时 新手友好度 72/100
kentcdodds/kody#3706 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
copperheadhq/copperhead#378 ·
维护者通常 1 天内回复