← Back to issue list

Using export-login on a credentials file that already exist fails with 'internal error'

View original Github issue

Metadata

Project
snapcraft
Number
#6301
Type
issue
State
open
Author
mbeijen
Labels
Created
Updated
Closed

Current evaluation

snapcraft export-login fails with PermissionError when the output file already exists, preventing re-runs with the same filename.

Suggested action: needs triage

Reason: The issue is unlabelled, has zero maintainer comments, and no assignee after 73 days. The bug report is clear with reproducible steps, but requires maintainer assessment to confirm it's still relevant and prioritize a fix.

Impact: 35 Quick Win: 26.25 Staleness: 65 Complexity: 25 Confidence: 75 Support Request: 5

Issue body

### Check existing issues - [x] I've verified that this bug isn't described by any existing issues. ### Bug description If I am using `snapcraft export-login` to export a macaroon and I re-run the command because for instance I forgot to change the acls or other parameters, I get `internal server error: PermissionError`. My expectation was that I just can re-run the command. ### Steps to reproduce First time works: ``` $ snapcraft export-login --snaps mysnap --channels mychannel --acls package_push,package_release --expires 2026-07-01T23:59:59Z mysnap.cred ... Email: michiel@example.com Password: Exported login credentials to 'mysnap.cred' ``` second time fails! ``` $ snapcraft export-login --snaps mysnap --channels mychannel --acls package_push,package_release --expires 2026-08-01T23:59:59Z mysnap.cred ... Email: michiel@example.com Password: snapcraft internal error: PermissionError(13, 'Permission denied') Full execution log: '/home/michiel/.local/state/snapcraft/log/snapcraft-xxxx.log' ``` ### Environment On Ubuntu 26.04 LTS, exporting credentials ### snapcraft.yaml ```yaml ``` ### Log output ```shell ```

Evaluation history

Date Model Scores Action Summary
qwen3.6-35b-a3b-mtp-q6
Impact: 35
Quick Win: 26.25
Staleness: 65
Complexity: 25
Confidence: 75
Support Request: 5
needs triage snapcraft export-login fails with PermissionError when the output file already exists, preventing re-runs with the same filename.
qwen/qwen3.6-35b-a3b
Staleness: 10
Complexity: 40
Confidence: 85
Support Request: 10
needs triage Bug report: 'snapcraft export-login' fails with PermissionError when overwriting an existing credentials file. No maintainer response yet.
qwen3.6-35b-a3b-mtp-q6
Staleness: 40
Complexity: 15
Confidence: 90
Support Request: 10
needs triage snapcraft export-login fails with PermissionError when the output credentials file already exists. Issue is unlabelled, has no maintainer comments, and is awaiting initial triage.
qwen3.6-35b-a3b-mtp-q6
Staleness: 5
Complexity: 15
Confidence: 85
Support Request: 5
needs triage snapcraft export-login fails with a PermissionError when the target credentials file already exists, instead of overwriting it. Untriaged, awaiting maintainer review.

Update history

No update history recorded yet.

Related issues

No related issues found above the similarity threshold.