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

Windows keyring error recommends cf auth login --use-keyring, which isn't a valid option

Aperta
#326 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
nodejs, typescript

Direzione di ricerca

Start from windowsBindingMissingMessage and secretToolMissingMessage in the shared workers-auth code, which build the cf auth login --use-keyring advice, and from setKeyringPreference, which no command exposes. Reproduce with CLOUDFLARE_AUTH_USE_KEYRING=true and no @napi-rs/keyring installed. Done means the message points only at options cf actually accepts, and that choice is agreed with maintainers first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary of the issue

On Windows, when CLOUDFLARE_AUTH_USE_KEYRING=true is set and @napi-rs/keyring isn't installed, any non-interactive auth command fails with:

Run `cf auth login --use-keyring` interactively to install it automatically, …
Or disable keyring storage: `cf auth login --no-use-keyring`.

cf auth login doesn't define --use-keyring or --useKeyring, so following the advice gives an unknown-argument error. The text comes from windowsBindingMissingMessage(loginCommand) in the shared workers-auth code, and the flag only exists in wrangler. In cf, keyring storage is controlled only by CLOUDFLARE_AUTH_USE_KEYRING or the stored keyring_enabled preference. setKeyringPreference exists, but no command exposes it. secretToolMissingMessage (Linux) has the same problem.

Related:

  • The fallback lookup uses npm root -g, so a global install made through Volta (and probably other version managers) is never found, even though the message suggests npm install -g.
  • defaultNpmRunner uses shell: true only on win32, which triggers Node 26's DEP0190 warning.
Expected behaviour

Suggested fix:

either add --use-keyring/--useKeyring to cf auth login, or pass cf-specific wording, such as setting CLOUDFLARE_AUTH_USE_KEYRING, into these messages.

Version of cf used

v1.0.0-beta.17

System information and package versions

Windows 10
Node 26.1.0
npm: 11.17.0

Reproduction (optional)

Run in PowerShell:

$env:CLOUDFLARE_AUTH_USE_KEYRING="true"; cf auth whoami < NUL
Relevant error logs (optional)

No response

Lingua principale
TypeScript
Stelle
853
Fork
42
Merge medio
17h 59m
PR unite (30g)
145

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/cf

Tutte le issue di cloudflare/cf

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.