← Back to issue list

[1.5] No keyring error with --export

View original Github issue

Metadata

Project
charmcraft
Number
#730
Type
issue
State
closed
Author
heitorPB
Labels
—
Created
Updated
Closed

Current evaluation

Fixed by merged PR #760 (commit df3c1908): login --export now uses ephemeral authentication and requires no keyring on headless systems.

Resolution: closed resolved

Reason: PR #760, "login command: --export is ephemeral", was merged with commit df3c1908 and explicitly resolved #730. Exported login credentials now use ephemeral authentication, avoiding keyring access.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Hello, I am trying to export a limited auth token to use with Github actions, but I had no success so far: ```bash $ CHARMCRAFT_AUTH="" charmcraft login --export=gh.auth --charm slurmd --charm slurmdbd --charm slurmctld --charm slurmrestd --permission package-manage No keyring found to store or retrieve credentials from. Full execution log: '/home/h/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220325-145605.991757.log' $ cat /home/h/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220325-145605.991757.log 2022-03-25 14:56:05.992 Starting charmcraft version 1.5.0 2022-03-25 14:56:05.992 Raw pre-parsed sysargs: args={'help': False, 'verbose': False, 'quiet': False, 'trace': False, 'project_dir': None} filtered=['login', '--export=gh.auth', '--charm', 'slurmd', '--charm', 'slurmdbd', '--charm', 'slurmctld', '--charm', 'slurmrestd', '--permission', 'package-manage'] 2022-03-25 14:56:05.992 General parsed sysargs: command='login' args=['--export=gh.auth', '--charm', 'slurmd', '--charm', 'slurmdbd', '--charm', 'slurmctld', '--charm', 'slurmrestd', '--permission', 'package-manage'] 2022-03-25 14:56:05.992 Couldn't find config file '/home/h/projects/slurm-charms/.github/workflows/charmcraft.yaml' 2022-03-25 14:56:05.993 Command parsed sysargs: Namespace(bundle=None, channel=None, charm=['slurmd', 'slurmdbd', 'slurmctld', 'slurmrestd'], export=PosixPath('gh.auth'), permission=['package-manage'], ttl=None) 2022-03-25 14:56:05.993 System details: OSPlatform(system='ubuntu', release='20.04', machine='x86_64'); Environment: None 2022-03-25 14:56:06.069 No keyring found to store or retrieve credentials from. 2022-03-25 14:56:06.071 Traceback (most recent call last): 2022-03-25 14:56:06.071 File "/snap/charmcraft/834/lib/charmcraft/commands/store/store.py", line 179, in __init__ 2022-03-25 14:56:06.071 self._client = Client(charmhub_config.api_url, charmhub_config.storage_url) 2022-03-25 14:56:06.071 File "/snap/charmcraft/834/lib/charmcraft/commands/store/client.py", line 57, in __init__ 2022-03-25 14:56:06.071 super().__init__( 2022-03-25 14:56:06.071 File "/snap/charmcraft/834/lib/craft_store/store_client.py", line 84, in __init__ 2022-03-25 14:56:06.071 super().__init__( 2022-03-25 14:56:06.071 File "/snap/charmcraft/834/lib/craft_store/base_client.py", line 65, in __init__ 2022-03-25 14:56:06.071 self._auth = Auth( 2022-03-25 14:56:06.071 File "/snap/charmcraft/834/lib/craft_store/auth.py", line 103, in __init__ 2022-03-25 14:56:06.071 raise errors.NoKeyringError() 2022-03-25 14:56:06.071 craft_store.errors.NoKeyringError: No keyring found to store or retrieve credentials from. 2022-03-25 14:56:06.071 Full execution log: '/home/h/snap/charmcraft/common/cache/charmcraft/log/charmcraft-20220325-145605.991757.log' ``` I am using Ubuntu LTS server 20.04, headless. Charmcraft from latest/candidate (version 1.5.0, rev 834). I thougth the `--export` flag would cause Charmcraft to not use a keyring?

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #760 (commit df3c1908): login --export now uses ephemeral authentication and requires no keyring on headless systems.
stealth/space-bunny-alpha — closed resolved Fixed by merged PR #760: `login --export` is now ephemeral and no longer requires a keyring on headless systems (merge commit c923fc54).
stealth/space-bunny-alpha — closed resolved Fixed in merged PR #760 (commit c923fc54): login --export became ephemeral, avoiding keyring access and failures when exporting credentials.
qwen3.6-35b-a3b-mtp-q6 — — charmcraft login --export failed on headless systems due to a mandatory keyring requirement. Fixed by pull request #760, which updated the auth flow to export credentials without requiring a local keyring.
qwen/qwen3.6-35b-a3b — — charmcraft login --export failed with NoKeyringError on headless systems due to mandatory keyring usage. Fixed by merging PR #760, which added an ephemeral login flag to bypass persistent credential storage.
qwen3.6-35b-a3b-mtp-q6 — — The charmcraft login --export command failed with NoKeyringError on headless systems. Maintainers implemented ephemeral login support to bypass keyring requirements, resolving the issue in pull request #760.

Update history

No update history recorded yet.

Related work

  • Likely Fixed By: charmcraft#760 (confidence 100%)

    Merged PR implementing ephemeral authentication for login --export.

  • Related To: charmcraft#719 (confidence 95%)

    Reported similar headless keyring failures and was explicitly identified as related.

Related issues

Issue Project State Summary Similarity
#760 login command: --export is ephemeral charmcraft merged Merged #760 as c923fc54 (commit df3c1908), making login --export ephemeral so no keyring access is required; fixed #730.
82%