Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'pass' based credential helper returns success when cred doesn't exist #220

Closed
nicks opened this issue Jul 27, 2022 · 1 comment · Fixed by #221
Closed

'pass' based credential helper returns success when cred doesn't exist #220

nicks opened this issue Jul 27, 2022 · 1 comment · Fixed by #221
Labels

Comments

@nicks
Copy link
Contributor

nicks commented Jul 27, 2022

Repro steps:

echo "garbage" | go run ./pass/cmd/main.go get

Expected:
Exit code 1

Actual:
Exit code 0
{"ServerURL":"garbage","Username":"","Secret":""}

This is the root of cryptic errors like:

WARNING: could not erase credentials: error erasing credentials - err: exit status 1, out: `exit status 1: Error: docker-credential-helpers/[CRED_FOLDER_NAME] is not in the password store.` 
@nicks nicks added the bug label Jul 27, 2022
@ericpromislow
Copy link

The thing I find strange is that calling the underlying function pass show security would write Error: security is not in the password store to stderr and exit with status 1. But if I remember looking at this code a while ago, it's walking the raw filesystem.

This is related to the other problem that you can't use docker-credential-pass list to determine if the docker password-store has even been initialized because it returns {}, even if pass (1) hasn't been installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants