fix: Tweak error message about SNAPCRAFT_STORE_CREDENTIALS
Metadata
Current evaluation
Merged in commit ee69b79b1, clarifying that login cannot be used while SNAPCRAFT_STORE_CREDENTIALS is set and removing ambiguous wording.
Resolution: closed resolved
Reason: PR #6098 was approved and merged as commit ee69b79b1. It reworded the error to clearly state that login is unavailable while SNAPCRAFT_STORE_CREDENTIALS is set.
Evaluated by: mr-cal-bot
No scores available.
Issue body
The message "Cannot login with 'SNAPCRAFT_STORE_CREDENTIALS' set." is ambiguous and could be interpreted as either "Cannot use the set of credentials in 'SNAPCRAFT_STORE_CREDENTIALS' to login" (incorrect) or "Cannot login while 'SNAPCRAFT_STORE_CREDENTIALS' is set" (correct). This PR changes the message to the latter.
This addresses feedback from @astrojuanlu in
https://forum.snapcraft.io/t/cannot-snapcraft-login/50665
---
- [ ] I've followed the [contribution guidelines](https://github.com/canonical/snapcraft/blob/main/CONTRIBUTING.md).
- [ ] I've signed the [CLA](http://www.ubuntu.com/legal/contributors/).
- [ ] I've successfully run `make lint && make test`.
- [ ] I've added or updated any relevant documentation.
- [ ] I've updated the relevant release notes.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| stealth/space-bunny-alpha | — | closed resolved | Merged in commit ee69b79b1, clarifying that login cannot be used while SNAPCRAFT_STORE_CREDENTIALS is set and removing ambiguous wording. | |
| stealth/space-bunny-alpha | — | closed resolved | Merged PR #6098 clarified that login fails while SNAPCRAFT_STORE_CREDENTIALS is set, removing the ambiguous error message; merged in commit ee69b79b1. | |
| qwen/qwen3.6-35b-a3b | — | — | Merged to clarify the ambiguous SNAPCRAFT_STORE_CREDENTIALS error message. The update explicitly states login fails while the variable is set, resolving user confusion. Approved by four reviewers and passed CI checks prior to merge. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix clarifying an ambiguous error message for SNAPCRAFT_STORE_CREDENTIALS. The updated text explicitly states login is blocked when the variable is set, addressing user feedback. A suggested positive phrasing was not adopted. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1978518 login still promots for username and password when using SNAPCRAFT_STORE_CREDENTIALS | snapcraft (launchpad) | closed | Closed as a usage misunderstanding: SNAPCRAFT_STORE_CREDENTIALS authenticates Snapcraft commands without running `snapcraft login`; no code fix was needed. | |
| #1748802 `snapcraft login` authentication failure message could be friendlier | snapcraft (launchpad) | closed | Fixed by merged PR snapcore/snapcraft#1936 (commit 688588a0d), which made the store API surface server-supplied error text, so login failures now read "Authentication error: Failed to get unbound discharge: Provided email/password is not correct." | |
| #5536 fix(store): catch credential decoding errors | snapcraft | merged | Merged in canonical/snapcraft#5536 (commit 3784560f3), converting malformed store credential decoding failures into a user-friendly error and updating craft-store. | |
| #1622635 Cryptic error message for store access failure. | snapcraft (launchpad) | closed | Request for a clearer 401 error suggesting 'snapcraft login' was closed as unnecessary after PR canonical/snapcraft#903 (commit 603948e1d) removed the login requirement for Store part downloads, fixing LP #1606903. | |
| #3493 cli: rename experimental login environment variable | snapcraft | merged | Merged in commit 88e4f922f, renaming experimental login variable SNAPCRAFT_LOGIN to SNAPCRAFT_STORE_AUTH to avoid conflicts with CI/CD environment names. | |
| #3808 store: login requires no exported credentials | snapcraft | merged | Merged into main as commit 7e6ef4514, updating store login so it no longer requires exported credentials for CRAFT-1148. | |
| #1922815 Error: Invalid value for '--experimental-login' | snapcraft (launchpad) | closed | SNAPCRAFT_LOGIN env var clashed with the --experimental-login flag's Click boolean option, breaking CI logins. Fixed by PR #3493 (commit 88e4f922f), renaming the variable to SNAPCRAFT_STORE_AUTH, shipped in Snapcraft 4.6.1. | |
| #6417 feat(store): error on candid creds | snapcraft | closed | Merged as 7ed8b939e: adds user-friendly errors and recovery advice for obsolete Candid store credentials, closing #6414 (SNAPCRAFT-1381). Lint failure was an unrelated 403 fetching an external KDE link. | |
| #1699232 Incorrect error message when the store returns 400 on login | snapcraft (launchpad) | closed | Fixed as a side effect of snapcore/snapcraft#1936: Snapcraft now displays messages returned by the store instead of labeling every 400 login response as an incorrect password. | |
| #1856502 Obscure error message from snapcraft release when not logged in correctly | snapcraft (launchpad) | open | Snapcraft exposed a raw 401 macaroon error from release; commit 8a854a8de (#3907) now gives invalid legacy credentials an actionable login or export-login resolution. |