Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#218 3 comentarios 1 reacción 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@aron-cf ya está trabajando en esto.

Desde el 8/10/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
9.5k
Forks
552
Merge medio
1 d 21 h
PR fusionados (30 d)
42

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de cloudflare/computer

Todos los issues de cloudflare/computer

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.