diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2017-11-01 11:24:59 -0400 |
---|---|---|
committer | Matthew Heon <matthew.heon@gmail.com> | 2017-11-01 11:24:59 -0400 |
commit | a031b83a09a8628435317a03f199cdc18b78262f (patch) | |
tree | bc017a96769ce6de33745b8b0b1304ccf38e9df0 /vendor/github.com/docker/docker-credential-helpers/README.md | |
parent | 2b74391cd5281f6fdf391ff8ad50fd1490f6bf89 (diff) | |
download | podman-a031b83a09a8628435317a03f199cdc18b78262f.tar.gz podman-a031b83a09a8628435317a03f199cdc18b78262f.tar.bz2 podman-a031b83a09a8628435317a03f199cdc18b78262f.zip |
Initial checkin from CRI-O repo
Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
Diffstat (limited to 'vendor/github.com/docker/docker-credential-helpers/README.md')
-rw-r--r-- | vendor/github.com/docker/docker-credential-helpers/README.md | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/vendor/github.com/docker/docker-credential-helpers/README.md b/vendor/github.com/docker/docker-credential-helpers/README.md new file mode 100644 index 000000000..f9cbc3fb5 --- /dev/null +++ b/vendor/github.com/docker/docker-credential-helpers/README.md @@ -0,0 +1,82 @@ +## Introduction + +docker-credential-helpers is a suite of programs to use native stores to keep Docker credentials safe. + +## Installation + +Go to the [Releases](https://github.com/docker/docker-credential-helpers/releases) page and download the binary that works better for you. Put that binary in your `$PATH`, so Docker can find it. + +### Building from scratch + +The programs in this repository are written with the Go programming language. These instructions assume that you have previous knowledge about the language and you have it installed in your machine. + +1 - Download the source and put it in your `$GOPATH` with `go get`. + +``` +$ go get github.com/docker/docker-credential-helpers +``` + +2 - Use `make` to build the program you want. That will leave any executable in the `bin` directory inside the repository. + +``` +$ cd $GOPATH/docker/docker-credentials-helpers +$ make osxkeychain +``` + +3 - Put that binary in your `$PATH`, so Docker can find it. + +## Usage + +### With the Docker Engine + +Set the `credsStore` option in your `.docker/config.json` file with the suffix of the program you want to use. For instance, set it to `osxkeychain` if you want to use `docker-credential-osxkeychain`. + +```json +{ + "credsStore": "osxkeychain" +} +``` + +### With other command line applications + +The sub-package [client](https://godoc.org/github.com/docker/docker-credential-helpers/client) includes +functions to call external programs from your own command line applications. + +There are three things you need to know if you need to interact with a helper: + +1. The name of the program to execute, for instance `docker-credential-osxkeychain`. +2. The server address to identify the credentials, for instance `https://example.com`. +3. The username and secret to store, when you want to store credentials. + +You can see examples of each function in the [client](https://godoc.org/github.com/docker/docker-credential-helpers/client) documentation. + +### Available programs + +1. osxkeychain: Provides a helper to use the OS X keychain as credentials store. +2. secretservice: Provides a helper to use the D-Bus secret service as credentials store. +3. wincred: Provides a helper to use Windows credentials manager as store. +4. pass: Provides a helper to use `pass` as credentials store. + +#### Note + +`pass` needs to be configured for `docker-credential-pass` to work properly. +It must be initialized with a `gpg2` key ID. Make sure your GPG key exists is in `gpg2` keyring as `pass` uses `gpg2` instead of the regular `gpg`. + +## Development + +A credential helper can be any program that can read values from the standard input. We use the first argument in the command line to differentiate the kind of command to execute. There are four valid values: + +- `store`: Adds credentials to the keychain. The payload in the standard input is a JSON document with `ServerURL`, `Username` and `Secret`. +- `get`: Retrieves credentials from the keychain. The payload in the standard input is the raw value for the `ServerURL`. +- `erase`: Removes credentials from the keychain. The payload in the standard input is the raw value for the `ServerURL`. +- `list`: Lists stored credentials. There is no standard input payload. + +This repository also includes libraries to implement new credentials programs in Go. Adding a new helper program is pretty easy. You can see how the OS X keychain helper works in the [osxkeychain](osxkeychain) directory. + +1. Implement the interface `credentials.Helper` in `YOUR_PACKAGE/YOUR_PACKAGE_$GOOS.go` +2. Create a main program in `YOUR_PACKAGE/cmd/main_$GOOS.go`. +3. Add make tasks to build your program and run tests. + +## License + +MIT. See [LICENSE](LICENSE) for more information. |