Azure / Azure/static-web-apps-cli

swa-cli login Failed to setup project: Cannot delete credentials

Offen
#927 1 Kommentar 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
668
Forks
156
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Before filing this issue, please ensure you're using the latest CLI by running `swa --version` and comparing to the latest version on [npm](https://www.npmjs.com/package/@azure/static-web-apps-cli).

```
# node --version
v22.14.0
# npm --version
10.9.2
# swa --version
2.0.3
```

**Are you accessing the CLI from the default port `:4280` ?**
- [ ] Yes

**Describe the bug**
after the login via az login the login via swa login with the option --clear-credentials fails.

**To Reproduce**
Steps to reproduce the behavior:

1. login via az li
2. execute swa login with --clear-credentials option
3. See error

**Expected behavior**
The client can connect to swa with different credentials.

**Screenshots**
```
# swa login --tenant xxx --client-id xxx --client-secret xxx- -subscription-id xxx --resource-group rg-test-we --app-name swa-test-we --clear-credentials --verbose=silly

Welcome to Azure Static Web Apps CLI (2.0.3)

Getting config file options from "swa-cli.config.json"...
Config file does not exist at "swa-cli.config.json"
Checking Azure session...
Executing authenticateWithAzureIdentity
- details:
- tenantId: xxx
- clientId: xxx
- clientSecret: xxx
- useKeychain: true
Keychain is enabled
Executing swaCliPersistencePlugin
Clearing keychain credentials
Clearing credentials cache
Machine ID:
Invoking crypto service
deleting credentials from keychain
- fullKey: xxx
Deleting credentials from native keychain
Getting keychain reference
isKeychainEnabled: true
KeychainCache: undefined
Attempting to load native keychain
✖ Failed to setup project: Cannot delete credentials

✖ If you believe this behavior is unexpected, please raise a GitHub issue at:
https://github.com/Azure/static-web-apps-cli/issues/new/choose
```

**Desktop (please complete the following information):**

- OS: RHEL
- Version 9.5

**Additional context**
N/A

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, `swa login` mit `--clear-credentials` auf RHEL 9.5 nach `az login` zu reproduzieren, wobei du die im Bericht gezeigten Versionen und Optionen verwendest, und untersuche anschließend die ausführliche Ausgabe rund um das Löschen der keychain-Anmeldedaten. Fertig ist die Aufgabe, wenn das Löschen der Anmeldedaten erfolgreich ist und die CLI mit anderen Anmeldedaten eine Verbindung herstellen kann, ohne dass der Setup-Fehler auftritt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
node.js, typescript
Bereich
authentication, cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.