• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

ci/H16-Jul-2019-3932

client/H16-Jul-2019-393300

credentials/H16-Jul-2019-560392

deb/H16-Jul-2019-9565

osxkeychain/H16-Jul-2019-637500

pass/H16-Jul-2019-280200

registryurl/H16-Jul-2019-143107

secretservice/H16-Jul-2019-397305

vendor/github.com/danieljoos/wincred/H16-Jul-2019-400321

wincred/H16-Jul-2019-407311

.gitignoreH A D16-Jul-201912 32

.travis.ymlH A D16-Jul-20191.3 KiB5147

CHANGELOG.mdH A D16-Jul-20191.9 KiB6238

JenkinsfileH A D16-Jul-20193.3 KiB8280

LICENSEH A D16-Jul-20191 KiB2117

MAINTAINERSH A D16-Jul-20192.7 KiB137114

MakefileH A D16-Jul-20192.1 KiB8360

README.mdH A D16-Jul-20193.6 KiB8352

appveyor.ymlH A D16-Jul-2019395 2516

README.md

1## Introduction
2
3docker-credential-helpers is a suite of programs to use native stores to keep Docker credentials safe.
4
5## Installation
6
7Go 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.
8
9### Building from scratch
10
11The 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.
12
131 - Download the source and put it in your `$GOPATH` with `go get`.
14
15```
16$ go get github.com/docker/docker-credential-helpers
17```
18
192 - Use `make` to build the program you want. That will leave an executable in the `bin` directory inside the repository.
20
21```
22$ cd $GOPATH/docker/docker-credentials-helpers
23$ make osxkeychain
24```
25
263 - Put that binary in your `$PATH`, so Docker can find it.
27
28## Usage
29
30### With the Docker Engine
31
32Set 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`.
33
34```json
35{
36  "credsStore": "osxkeychain"
37}
38```
39
40### With other command line applications
41
42The sub-package [client](https://godoc.org/github.com/docker/docker-credential-helpers/client) includes
43functions to call external programs from your own command line applications.
44
45There are three things you need to know if you need to interact with a helper:
46
471. The name of the program to execute, for instance `docker-credential-osxkeychain`.
482. The server address to identify the credentials, for instance `https://example.com`.
493. The username and secret to store, when you want to store credentials.
50
51You can see examples of each function in the [client](https://godoc.org/github.com/docker/docker-credential-helpers/client) documentation.
52
53### Available programs
54
551. osxkeychain: Provides a helper to use the OS X keychain as credentials store.
562. secretservice: Provides a helper to use the D-Bus secret service as credentials store.
573. wincred: Provides a helper to use Windows credentials manager as store.
584. pass: Provides a helper to use `pass` as credentials store.
59
60#### Note
61
62`pass` needs to be configured for `docker-credential-pass` to work properly.
63It 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`.
64
65## Development
66
67A 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:
68
69- `store`: Adds credentials to the keychain. The payload in the standard input is a JSON document with `ServerURL`, `Username` and `Secret`.
70- `get`: Retrieves credentials from the keychain. The payload in the standard input is the raw value for the `ServerURL`.
71- `erase`: Removes credentials from the keychain. The payload in the standard input is the raw value for the `ServerURL`.
72- `list`: Lists stored credentials. There is no standard input payload.
73
74This 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.
75
761. Implement the interface `credentials.Helper` in `YOUR_PACKAGE/YOUR_PACKAGE_$GOOS.go`
772. Create a main program in `YOUR_PACKAGE/cmd/main_$GOOS.go`.
783. Add make tasks to build your program and run tests.
79
80## License
81
82MIT. See [LICENSE](LICENSE) for more information.
83