You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The implementation used in the docker cli itself appears to call registry.ConvertToHostname(serverAddress) before calling the credential helper.
This works fine with docker-credential-gcr but not with docker-credential-gcloud which comes in newer versions of the Google Cloud SDK packages.
Reproduction steps
$ echo https://us.gcr.io/PROJECTID/IMAGE/NAME | docker-credential-gcr get
{"ServerURL":"","Username":"oauth2accesstoken","Secret":"blah"}
$ echo https://us.gcr.io/PROJECTID/IMAGE/NAME | docker-credential-gcloud get
ERROR: (gcloud.auth.docker-helper) Repository url [https://us.gcr.io/PROJECTID/IMAGE/NAME] is not supported
Nomad Server logs (if appropriate)
2018/01/30 22:58:52.659702 [ERR] driver.docker: failed pulling container us.gcr.io/PROJECTID/IMAGE/NAME:latest: API error (404): {"message":"pull access denied for us.gcr.io/PROJECTID/IMAGE/NAME, repository does not exist or may require 'docker login'"}
I also opened a ticket about the difference in behavior on the two credential helpers with gcloud support to see if it was intentional and could be documented. I'm still getting familiar with the code base so I apologize if I've misdiagnosed things.
The text was updated successfully, but these errors were encountered:
$ echo https://us.gcr.io | docker-credential-gcloud get
{"ServerURL":"","Username":"oauth2accesstoken","Secret":"blah"}
This works fine and is what docker pull itself will do successfully after setting up /root/.docker/config.json with the following content generated from gcloud beta auth configure-docker.
I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Nomad version
Operating system and Environment details
GCE
n1-standard-1
instance booted from https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20180126 with the following packages installed:Issue
Nomad is sending the full repository name to the credential helper https://github.com/hashicorp/nomad/blob/master/client/driver/docker.go#L2015
The helper is meant to take the "server address" as described in https://docs.docker.com/engine/reference/commandline/login/#credential-helper-protocol.
The implementation used in the docker cli itself appears to call
registry.ConvertToHostname(serverAddress)
before calling the credential helper.This works fine with
docker-credential-gcr
but not withdocker-credential-gcloud
which comes in newer versions of the Google Cloud SDK packages.Reproduction steps
Nomad Server logs (if appropriate)
I also opened a ticket about the difference in behavior on the two credential helpers with gcloud support to see if it was intentional and could be documented. I'm still getting familiar with the code base so I apologize if I've misdiagnosed things.
The text was updated successfully, but these errors were encountered: