Skip to content

Commit

Permalink
Update error message for unsupported 'add's
Browse files Browse the repository at this point in the history
gcloud docker currently fails somewhat unhelpfully

Change-Id: Ib91f5104acaa71b7c53cbfb94b4e0cfd83d4744b
Signed-off-by: Jake Sanders <jsand@google.com>
  • Loading branch information
Jake Sanders committed Aug 31, 2016
1 parent 147f725 commit a802e9d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion credhelper/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ func (ch *gcrCredHelper) List() ([]string, []string, error) {
func (ch *gcrCredHelper) Add(creds *credentials.Credentials) error {
serverURL := creds.ServerURL
if isAGCRHostname(serverURL) {
return helperErr("this operation is unsupported for GCR, please see docker-credential-gcr documentation for supported login methods", nil)
errStr := "this operation is unsupported for GCR, please see docker-credential-gcr documentation for supported login methods. " +
"'gcloud docker' is unnecessary when using docker-credential-gcr, use 'docker' instead."
return helperErr(errStr, nil)
}
if err := ch.store.SetOtherCreds(creds); err != nil {
return helperErr("could not store 3p credentials for "+serverURL, err)
Expand Down

0 comments on commit a802e9d

Please sign in to comment.