Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

git: host-held credentials for model-driven clone, fetch, pull and push

Aperta
#218 3 commenti 1 reazione 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@aron-cf ci sta già lavorando.

Dal 8/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

enhancement

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, and ls-remote call the resolver for every network request. That covers the typed client, git.cli, the worker-shell git command, and ws: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.
Lingua principale
TypeScript
Stelle
9.5k
Fork
552
Merge medio
2g 6h
PR unite (30g)
47

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudflare/computer

Tutte le issue di cloudflare/computer

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.