pass: changed the way for checking if password-store is initalized - #124
Conversation
|
Please sign your commits following these rules: $ git clone -b "master" git@github.com:eyJhb/docker-credential-helpers.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -fAmending updates the existing PR. You DO NOT need to open a new one. |
Signed-off-by: eyjhbb@gmail.com <eyjhbb@gmail.com>
| // We just run a `pass ls`, if it fails then pass is not initialized. | ||
| _, err := p.runPassHelper("", "ls") | ||
| if err != nil { | ||
| return fmt.Errorf("error initializing pass: %v", err) |
There was a problem hiding this comment.
Hello @eyJhb,
What do you think about changing the error message to something on these lines?
password-store not initialized: %v.
Since we are not trying to intialize the password-store, this message could confuse users.
There was a problem hiding this comment.
Good point! Kept it as pass instead of password-store, hope that is OK :)
There was a problem hiding this comment.
Sure! No problem. 🎉
Thanks for the fix!
There was a problem hiding this comment.
No problem! Just hope that it will get approved and merged at some point, but looking at the other PRs, I am not sure it will happen anytime soon.
…lized Signed-off-by: eyjhbb@gmail.com <eyjhbb@gmail.com>
|
Just a little ping, @vdemeester @n4ss if you get the time to review and merge this. |
|
Great! Do not hesitate if you have any questions or I need to do anything, so we can get this merged and close the two PRs and the one issue :) |
|
I've been seeing my |
|
OK here's another essential tip if you find your ... so that |
full diff: docker/docker-credential-helpers@5241b46...8a9f93a includes: - docker/docker-credential-helpers#29 C.free(unsafe.Pointer(err)) -> C.g_error_free(err) - docker/docker-credential-helpers#124 pass: changed the way for checking if password-store is initalized - addresses docker/docker-credential-helpers#133 docker-credential-pass commits about 10 times every time I run a docker command - docker/docker-credential-helpers#143 Fix docker-credential-osxkeychain list behaviour in case of missing entry in keychain - docker/docker-credential-helpers#139 make docker-credential-wincred work like docker-credential-osxkeychain Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: docker/docker-credential-helpers@5241b46...8a9f93a includes: - docker/docker-credential-helpers#29 C.free(unsafe.Pointer(err)) -> C.g_error_free(err) - docker/docker-credential-helpers#124 pass: changed the way for checking if password-store is initalized - addresses docker/docker-credential-helpers#133 docker-credential-pass commits about 10 times every time I run a docker command - docker/docker-credential-helpers#143 Fix docker-credential-osxkeychain list behaviour in case of missing entry in keychain - docker/docker-credential-helpers#139 make docker-credential-wincred work like docker-credential-osxkeychain Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: f6a4c76fbb6d594f4874dea5059e82eadfae867a Component: cli
full diff: docker/docker-credential-helpers@5241b46...8a9f93a includes: - docker/docker-credential-helpers#29 C.free(unsafe.Pointer(err)) -> C.g_error_free(err) - docker/docker-credential-helpers#124 pass: changed the way for checking if password-store is initalized - addresses docker/docker-credential-helpers#133 docker-credential-pass commits about 10 times every time I run a docker command - docker/docker-credential-helpers#143 Fix docker-credential-osxkeychain list behaviour in case of missing entry in keychain - docker/docker-credential-helpers#139 make docker-credential-wincred work like docker-credential-osxkeychain Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit f6a4c76) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: docker/docker-credential-helpers@5241b46...8a9f93a includes: - docker/docker-credential-helpers#29 C.free(unsafe.Pointer(err)) -> C.g_error_free(err) - docker/docker-credential-helpers#124 pass: changed the way for checking if password-store is initalized - addresses docker/docker-credential-helpers#133 docker-credential-pass commits about 10 times every time I run a docker command - docker/docker-credential-helpers#143 Fix docker-credential-osxkeychain list behaviour in case of missing entry in keychain - docker/docker-credential-helpers#139 make docker-credential-wincred work like docker-credential-osxkeychain Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit f6a4c76) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: docker/docker-credential-helpers@5241b46...8a9f93a includes: - docker/docker-credential-helpers#29 C.free(unsafe.Pointer(err)) -> C.g_error_free(err) - docker/docker-credential-helpers#124 pass: changed the way for checking if password-store is initalized - addresses docker/docker-credential-helpers#133 docker-credential-pass commits about 10 times every time I run a docker command - docker/docker-credential-helpers#143 Fix docker-credential-osxkeychain list behaviour in case of missing entry in keychain - docker/docker-credential-helpers#139 make docker-credential-wincred work like docker-credential-osxkeychain Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit f6a4c76) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: docker/docker-credential-helpers@5241b46...8a9f93a includes: - docker/docker-credential-helpers#29 C.free(unsafe.Pointer(err)) -> C.g_error_free(err) - docker/docker-credential-helpers#124 pass: changed the way for checking if password-store is initalized - addresses docker/docker-credential-helpers#133 docker-credential-pass commits about 10 times every time I run a docker command - docker/docker-credential-helpers#143 Fix docker-credential-osxkeychain list behaviour in case of missing entry in keychain - docker/docker-credential-helpers#139 make docker-credential-wincred work like docker-credential-osxkeychain Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit f6a4c76) Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
full diff: docker/docker-credential-helpers@5241b46...8a9f93a includes: - docker/docker-credential-helpers#29 C.free(unsafe.Pointer(err)) -> C.g_error_free(err) - docker/docker-credential-helpers#124 pass: changed the way for checking if password-store is initalized - addresses docker/docker-credential-helpers#133 docker-credential-pass commits about 10 times every time I run a docker command - docker/docker-credential-helpers#143 Fix docker-credential-osxkeychain list behaviour in case of missing entry in keychain - docker/docker-credential-helpers#139 make docker-credential-wincred work like docker-credential-osxkeychain Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit f6a4c76fbb6d594f4874dea5059e82eadfae867a) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 24dcc56123634e048dc0c7d8fa2eeff65b97a33a Component: cli
full diff: docker/docker-credential-helpers@5241b46...8a9f93a includes: - docker/docker-credential-helpers#29 C.free(unsafe.Pointer(err)) -> C.g_error_free(err) - docker/docker-credential-helpers#124 pass: changed the way for checking if password-store is initalized - addresses docker/docker-credential-helpers#133 docker-credential-pass commits about 10 times every time I run a docker command - docker/docker-credential-helpers#143 Fix docker-credential-osxkeychain list behaviour in case of missing entry in keychain - docker/docker-credential-helpers#139 make docker-credential-wincred work like docker-credential-osxkeychain Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (cherry picked from commit f6a4c76fbb6d594f4874dea5059e82eadfae867a) Signed-off-by: Sebastiaan van Stijn <github@gone.nl> Upstream-commit: 11b15544c503d91d8ea3ba782d30d2070a24d84e Component: cli
Changed the way that
docker-credential-helperscheck ifpassword-storeis initialized.The current way inserts and removes a password, each time it is called, to make sure that pass is initialized.
This creates a lot of commits if the password-store is made as a git repository (which is quite awful).
The following is how many commits has been made, over a span of ~2 months...
I have changed the way to just do a
pass ls, as it will fail if pass is not initialized.If it should fail, it will fail at a read of pass or insert of pass anyways, and therefore this solution is much more elegant.