← Back to issue list

craft-store error when using `charmcraft login` command

View original Github issue

Metadata

Project
charmcraft
Number
#725
Type
issue
State
closed
Author
gruyaume
Labels
Created
Updated
Closed

Current evaluation

Closed as superseded by #833. The error triggers when charmhub credentials already exist. Maintainers acknowledged the confusing UX and planned a craft-store fix, but redirected tracking to the dedicated ticket.

Suggested action:

No scores available.

Issue body

**OVERVIEW** I am unable to login to charmhub via the `charmcraft login` command, I get this error message: "Credentials found for 'charmcraft' on 'api.charmhub.io'." Note that I'm able to login to charmhub via the web charmhub.io's web interface. Regardless of whether this is a bug with charmcraft or not, the error message is confusing. Full output: ``` guillaume@thinkpad:~/PycharmProjects/charmed-magma/orchestrator-bundle/orc8r-bundle$ charmcraft login -v 2022-03-21 14:41:58.451 Starting charmcraft version 1.5.0 2022-03-21 14:41:58.451 Logging execution to '/home/guillaume/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220321-144158.450860.log' 2022-03-21 14:41:58.527 craft-store error: Credentials found for 'charmcraft' on 'api.charmhub.io'. 2022-03-21 14:41:58.528 Full execution log: '/home/guillaume/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220321-144158.450860.log' ``` **ENVIRONMENT** - OS: Ubuntu 21.10 - Charmcraft version: latest/stable 1.5.0 (snap id: gcqfpVCOUvmDuYT0Dh5PjdeGypSEzNdV) **STEPS TO REPRODUCE** ``` charmcraft login ```

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6 Closed as superseded by #833. The error triggers when charmhub credentials already exist. Maintainers acknowledged the confusing UX and planned a craft-store fix, but redirected tracking to the dedicated ticket.
qwen/qwen3.6-35b-a3b Closed as superseded. The confusing login error fix is tracked in #833.
qwen3.6-35b-a3b-mtp-q6 Closed as superseded. The confusing credentials error on charmcraft login is tracked in issue #833, which addresses improved messaging and proper logout handling.
qwen3.6-35b-a3b-mtp-q6 Closed as superseded. The confusing credentials error during charmcraft login is being addressed in issue #833, which tracks a dedicated fix for handling pre-existing credentials.

Update history

No update history recorded yet.

Related issues

Issue Project State Summary Similarity
#843 Better User facing message when credentials not found charmcraft closed Closed as superseded. The credential error originates from the Craft Store library's keyring handling, not charmcraft. Tracking moved to canonical/craft-store#58 for upstream resolution.
78%
#810 Confusing output from `charmcraft login` charmcraft closed Reported confusing charmcraft login error when credentials already exist. Team agreed to improve messaging to prompt users to logout first. Issue closed and superseded by tracking issue #833 to implement the fix.
77%
#901 Charmcraft login on remote device has unhelpful error message charmcraft closed Closed. The unhelpful remote login error is tracked upstream in craft-store issue #58, as the fix requires changes to the underlying authentication library rather than Charmcraft itself.
73%
#759 charmcraft login produces an error charmcraft closed Closed as superseded by issue #833. The duplicate login error will be improved with clearer guidance and suggested fixes. No code changes applied in this report.
73%
#916 (charmhub) Provide a better error to the user on a login attempt when already having credentials (CRAFT-1269) charmcraft merged Merged changes that improve Charmhub login error messaging when credentials already exist, resolving issue #833 and ticket CRAFT-1269. Approved by one reviewer with minimal code modifications.
71%
#672 charmcraft 1.4.0: impossible to login to charmhub charmcraft closed Closed as expected behavior. Charmcraft falls back to a non-persistent memory ring on headless systems lacking a keyring, preventing credential persistence. Maintainers advised exporting credentials via environment variables instead of implementing a code fix.
71%