- renamed the "key" variable, which was slightly confusing
- include the name of the binary in the error
Before this change:
docker-credential-osxkeychain nosuchaction
Unknown credential action `nosuchaction`
After this change:
docker-credential-osxkeychain nosuchaction
docker-credential-osxkeychain: unknown action: nosuchaction
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
GNU guidelines describes; https://www.gnu.org/prep/standards/html_node/_002d_002dversion.html#g_t_002d_002dversion
The program’s name should be a constant string; don’t compute it from argv[0].
The idea is to state the standard or canonical name for the program, not its
file name.
Although the above recommendation is for `--version` output, it probably makes
sense to do the same for the "usage" output.
Before this change:
/usr/local/bin/docker-credential-osxkeychain invalid command
Usage: /usr/local/bin/docker-credential-osxkeychain <store|get|erase|list|version>
/Applications/Docker.app/Contents/Resources/bin/docker-credential-osxkeychain invalid command
Usage: /Applications/Docker.app/Contents/Resources/bin/docker-credential-osxkeychain <store|get|erase|list|version>
With this patch:
/usr/local/bin/docker-credential-osxkeychain invalid command
Usage: docker-credential-osxkeychain <store|get|erase|list|version>
/Applications/Docker.app/Contents/Resources/bin/docker-credential-osxkeychain invalid command
Usage: docker-credential-osxkeychain <store|get|erase|list|version>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
- Explicitly suppress some unhandled errors
- Use "pass" credentials helper in examples, which is available
on more platforms than "secretservice" (only supporte on Linux)
- Update domain and username in examples.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Fix storing URLs without scheme
If secrets are stored without specifying a scheme
(https://), the keychain-helper would interpret the
hostname as _path_, causing lookup of secrets to fail.
This patch makes sure that a scheme is added (if missing).
If no scheme is specified, https:// is used as a default.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
* Have pre go1.8 compiler able to compile
Signed-off-by: Tibor Vass <teabee89@gmail.com>
* Fix URL parsing with port and no scheme
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
* Improve parseURL comment
Signed-off-by: Nassim 'Nass' Eddequiouaq <eddequiouaq.nassim@gmail.com>
This is a simplification of how the docker engine implements
this feature, but it will be ported there once this is merged.
Signed-off-by: David Calavera <david.calavera@gmail.com>