← 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

Confusing craft-store "Credentials found" error on `charmcraft login` (double login). Closed by facundobatista as tracked in the more specific #833, whose improved error landed via PR #916.

Resolution: closed superseded

Reason: Maintainer facundobatista closed it on 2022-09-05 stating the solution was being tracked in the more specific issue #833. #833 was later resolved by merged PR #916, which now emits "Cannot login because credentials were found in your system (which may be no longer valid, though)." with resolution "Please logout first, then login again." in charmcraft/store/store.py.

Evaluated by: mr-cal-bot

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
stealth/space-bunny-alpha — closed superseded Confusing craft-store "Credentials found" error on `charmcraft login` (double login). Closed by facundobatista as tracked in the more specific #833, whose improved error landed via PR #916.
stealth/space-bunny-alpha — closed superseded Closed as superseded by #833; PR #916 later merged its improved error guidance in commit 5e656275.
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.

Update history

No update history recorded yet.

Related work

  • Superseded By: charmcraft#833 (confidence 97%)

    Maintainer explicitly cited #833 as the tracking issue before closing #725.

  • Likely Fixed By: canonical/charmcraft#916 (confidence 88%)

    PR that merged the improved double-login error message and logout suggestion, now present in charmcraft/store/store.py.

Related issues

Issue Project State Summary Similarity
#759 charmcraft login produces an error charmcraft closed Closed as superseded by #833, which improved the double-login error and recommended `charmcraft logout`; the follow-up was resolved by merged PR #916.
81%
#609 store: handle store errors in whoami command (CRAFT-701) charmcraft merged Merged in canonical/charmcraft#609 via 3d7474b1 (merge 69df5a9a), adding allow_login so whoami reports logged-out and expired-credential errors without automatic login.
75%
#672 charmcraft 1.4.0: impossible to login to charmhub charmcraft closed Closed as intended behavior: the headless remote host had no local keyring, so Charmcraft could not persist credentials; exporting credentials was the supported workaround.
75%
#843 Better User facing message when credentials not found charmcraft closed Closed by facundobatista as out of scope for charmcraft: the "Prompt dismissed" InitError comes from a keyring crash in Craft Store, not missing credentials. Tracked upstream in canonical/craft-store#58.
75%
#844 Cannot use charmcraft login charmcraft closed Login failed over SSH ('Prompt dismissed'). Maintainer closed it pointing to Charmhub discourse instructions for authenticating in remote environments; no code change.
75%
#810 Confusing output from `charmcraft login` charmcraft closed Superseded by #833 and resolved by merged PR #916, which clarified that stored credentials may be invalid and advised users to log out before logging in again.
74%
#901 Charmcraft login on remote device has unhelpful error message charmcraft closed Superseded by canonical/craft-store#58 and fixed there through PR #390 (d87f1bd), which converts keyring initialization failures into KeyringUnlockError.
73%
#916 (charmhub) Provide a better error to the user on a login attempt when already having credentials (CRAFT-1269) charmcraft merged Merged PR #916 in commit 3b54c459, improving the double-login error to explain that stored credentials may be invalid and recommend logging out; fixes #833.
73%
#741 charmcraft environment var not mention in help for store commands charmcraft closed Added help text explaining how to use the value produced by `charmcraft login --export` (setting CHARMCRAFT_AUTH), via commit 9d0957ee, referenced in the closing comment.
72%
#667 craft store: update to 2.0.0 (CRAFT-773) charmcraft merged Merged PR #667 by sergiusens bumped charmcraft to craft-store 2.0.0 (CRAFT-773, commit 7d893cdc): new StoreClient init params, NotLoggedIn -> CredentialsUnavailable rename, better missing-keyring handling.
71%