Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kind-gcr.sh example does not work for authentication token #1826

Closed
MaxRenaud opened this issue Aug 28, 2020 · 1 comment
Closed

kind-gcr.sh example does not work for authentication token #1826

MaxRenaud opened this issue Aug 28, 2020 · 1 comment
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@MaxRenaud
Copy link
Contributor

What happened:
The example on https://kind.sigs.k8s.io/docs/user/private-registries/#use-an-access-token does not work since Docker 18+ will use the OS Credential Store by default.
See https://docs.docker.com/engine/reference/commandline/login/#credentials-store
The generated client.json file will not contain the authentication token:

% gcloud auth print-access-token | \
  docker login -u oauth2accesstoken --password-stdin https://gcr.io
% cat ${DOCKER_CONFIG}/config.json
{
	"auths": {
		"gcr.io": {}
	},
	"HttpHeaders": {
		"User-Agent": "Docker-Client/19.03.12 (darwin)"
	},
	"credsStore": "osxkeychain"
}%

What you expected to happen:
I expected the config.json file to contain an "auth" key under auths["gcr.io"]

How to reproduce it (as minimally and precisely as possible):

% export DOCKER_CONFIG=$(mktemp -d)
% rm ${DOCKER_CONFIG}/config.json
% gcloud auth print-access-token | \
  docker login -u oauth2accesstoken --password-stdin https://gcr.io
% cat ${DOCKER_CONFIG}/config.json

Anything else we need to know?:
PR #1825

Environment:

  • kind version: (use kind version): kind v0.8.1 go1.14.2 darwin/amd64
  • Kubernetes version: (use kubectl version):
Client Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.0", GitCommit:"9e991415386e4cf155a24b1da15becaa390438d8", GitTreeState:"clean", BuildDate:"2020-03-25T14:58:59Z", GoVersion:"go1.13.8", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"18", GitVersion:"v1.18.2", GitCommit:"52c56ce7a8272c798dbc29846288d7cd9fbae032", GitTreeState:"clean", BuildDate:"2020-04-30T20:19:45Z", GoVersion:"go1.13.9", Compiler:"gc", Platform:"linux/amd64"}
  • Docker version: (use docker info):
Client: Docker Engine - Community
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a66213fe
 Built:             Mon Jun 22 15:41:33 2020
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.12
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       48a66213fe
  Built:            Mon Jun 22 15:49:27 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
  • OS (e.g. from /etc/os-release): Darwin Kernel Version 19.5.0
@MaxRenaud MaxRenaud added the kind/bug Categorizes issue or PR as related to a bug. label Aug 28, 2020
@BenTheElder BenTheElder added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Aug 28, 2020
@BenTheElder
Copy link
Member

fixed in #1825, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

No branches or pull requests

2 participants