public class DockerCredentialHelper extends Object
| Constructor and Description |
|---|
DockerCredentialHelper(String serverUrl,
Path credentialHelper)
Constructs a new
DockerCredentialHelper. |
| Modifier and Type | Method and Description |
|---|---|
Credential |
retrieve()
Calls the credential helper CLI in the form:
|
public DockerCredentialHelper(String serverUrl, Path credentialHelper)
DockerCredentialHelper.serverUrl - the server URL to pass into the credential helpercredentialHelper - the path to the credential helper executablepublic Credential retrieve() throws IOException, CredentialHelperUnhandledServerUrlException, CredentialHelperNotFoundException
echo -n <server URL> | docker-credential-<credential helper suffix> get
IOException - if writing/reading process input/output failsCredentialHelperUnhandledServerUrlException - if no credentials could be found for the
corresponding serverCredentialHelperNotFoundException - if the credential helper CLI doesn't existCopyright © 2019. All rights reserved.