← Back to issue list

charmcraft login produces an error

View original Github issue

Metadata

Project
charmcraft
Number
#759
Type
issue
State
closed
Author
erik78se
Labels
—
Created
Updated
Closed

Current evaluation

Closed as superseded by #833, which improved the double-login error and recommended `charmcraft logout`; the follow-up was resolved by merged PR #916.

Resolution: closed superseded

Reason: Maintainer facundobatista closed #759 because follow-up issue #833 tracked the missing guidance for stored credentials. PR #916 later resolved that work by improving the error and suggesting logout.

Evaluated by: mr-cal-bot

No scores available.

Issue body

I was trying to login to charmstore $ charmcraft login /snap/charmcraft/904/lib/secretstorage/util.py:46: UserWarning: Passing unwrap= to .send_and_get_reply() is deprecated and will break in a future version of Jeepney. return self._connection.send_and_get_reply(msg, unwrap=True) craft-store error: Credentials found for 'charmcraft' on 'api.charmhub.io'. Full execution log: '/home/erik/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220428-215907.462845.log' That didn't work great.... $ cat /home/erik/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220428-220016.311075.log 2022-04-28 22:00:16.311 Starting charmcraft version 1.6.0 2022-04-28 22:00:16.311 Raw pre-parsed sysargs: args={'help': False, 'verbose': False, 'quiet': False, 'trace': False, 'project_dir': None} filtered=['login'] 2022-04-28 22:00:16.311 General parsed sysargs: command='login' args=[] 2022-04-28 22:00:16.314 Command parsed sysargs: Namespace(bundle=None, channel=None, charm=None, export=None, permission=None, ttl=None) 2022-04-28 22:00:16.314 System details: OSPlatform(system='ubuntu', release='20.04', machine='x86_64'); Environment: DESKTOP_SESSION='gnome', XDG_CURRENT_DESKTOP='GNOME' 2022-04-28 22:00:16.472 craft-store error: Credentials found for 'charmcraft' on 'api.charmhub.io'. 2022-04-28 22:00:16.472 Full execution log: '/home/erik/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220428-220016.311075.log' But $ charmcraft names .... threw me login browser.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed superseded Closed as superseded by #833, which improved the double-login error and recommended `charmcraft logout`; the follow-up was resolved by merged PR #916.
stealth/space-bunny-alpha — closed superseded Superseded by #833; PR #916 fixed the confusing double-login error by recommending `charmcraft logout` (commit 5e656275).
stealth/space-bunny-alpha — closed superseded The confusing existing-credentials login error was tracked by #833 and fixed by merged PR #916 (commit 5e656275), which recommends `charmcraft logout` and explains the double-login case.
stealth/space-bunny-alpha — closed superseded Superseded by #833; PR #916 later improved the double-login error to explain invalid credentials and recommend `charmcraft logout` before logging in again.
qwen3.6-35b-a3b-mtp-q6 — — 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.
qwen/qwen3.6-35b-a3b — — Closed as superseded. The charmcraft login credential conflict is tracked in issue #833, which will improve the error message and recommend running charmcraft logout to resolve the double-login state.
qwen3.6-35b-a3b-mtp-q6 — — Closed in favor of issue #833 to track improvements for handling duplicate login credentials. Error messaging and resolution guidance for existing tokens will be addressed separately.

Update history

No update history recorded yet.

Related work

  • Superseded By: canonical/charmcraft#833 (confidence 99%)

    The closing maintainer explicitly opened this follow-up to track the double-login error and its missing solution.

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

    Merged PR that resolved #833 by warning about potentially invalid stored credentials and recommending logging out first.

Related issues

Issue Project State Summary Similarity
#725 craft-store error when using `charmcraft login` command charmcraft closed 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.
81%
#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.
81%
#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.
76%
#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.
76%
#191 charmcraft logout doesn't tell you if you were logged out charmcraft closed Fixed in Charmcraft 1.5 by the craft-store migration: logout now distinguishes an already logged-out state; PR #565 was merged as 70ba8e28.
74%
#192 charmcraft login could list charms and statuses charmcraft closed Enhancement request to have `charmcraft login` also list account charms/statuses was declined and closed; maintainer facundobatista argued login is rarely needed due to auto-login and should stay lightweight.
74%
#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%
#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.
70%
#190 charmcraft whoami tries to login charmcraft closed Fixed in merged PR #609 (merge commit 69df5a9a): whoami now reports logged-out or expired credentials without opening an authorization page.
70%