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

github packages needs login for failure over image #8160

Closed
yc-alex-xu opened this issue May 15, 2020 · 4 comments
Closed

github packages needs login for failure over image #8160

yc-alex-xu opened this issue May 15, 2020 · 4 comments
Labels
co/docker-driver Issues related to kubernetes in container needs-solution-message Issues where where offering a solution for an error would be helpful triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@yc-alex-xu
Copy link

yc-alex-xu commented May 15, 2020

Steps to reproduce the issue:
preparation done:

  1. docker installed already
  2. docker login docker.pkg.github.com return succeed.
  3. the github personal token created already, given the scope as: package read
  4. curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube_latest_amd64.deb
  5. sudo dpkg -i minikube_latest_amd64.deb

steps
1.minikube start --driver=docker alsologtostderr
2.open https://docker.pkg.github.com/v2/kubernetes/minikube/kicbase/manifests/v0.0.10: in browser
it return
scopes to execute this query. The 'name' field requires one of the following scopes: ['read:packages'], but your token has only been granted the: [''] scopes. Please modify your token's scopes at: https://github.com/settings/tokens."}]}

Full output of failed command:

$ minikube start --driver=docker alsologtostderr
😄 minikube v1.10.1 on Ubuntu 18.04
✨ Using the docker driver based on existing profile
👍 Starting control plane node minikube in cluster minikube
🚜 Pulling base image ...
E0515 17:43:02.649210 9727 cache.go:129] Error downloading kic artifacts: getting remote image: GET https://docker.pkg.github.com/v2/kubernetes/minikube/kicbase/manifests/v0.0.10: UNAUTHORIZED: GitHub Docker Registry needs login
🤷 docker "minikube" container is missing, will recreate.
E0515 17:43:02.943026 9727 oci.go:79] docker daemon seems to be stuck. Please try restarting your docker. Will try to delete anyways: unknown state "minikube": docker inspect minikube --format={{.State.Status}}: exit status 1
stdout:

stderr:
Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State"
🔥 Creating docker container (CPUs=2, Memory=2200MB) ...
🤦 StartHost failed, but will try again: recreate: creating host: create: creating: create kic node: create container: docker run -d -t --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=2200mb -e container=docker --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 --publish=127.0.0.1::5000 docker.pkg.github.com/kubernetes/minikube/kicbase:v0.0.10: exit status 125
stdout:

stderr:
Unable to find image 'docker.pkg.github.com/kubernetes/minikube/kicbase:v0.0.10' locally
docker: Error response from daemon: unauthorized: Your token has not been granted the required scopes to execute this query. The 'name' field requires one of the following scopes: ['read:packages'], but your token has only been granted the: [''] scopes. Please modify your token's scopes at: https://github.com/settings/tokens.
See 'docker run --help'.

🤷 docker "minikube" container is missing, will recreate.
E0515 17:43:39.943559 9727 oci.go:79] docker daemon seems to be stuck. Please try restarting your docker. Will try to delete anyways: unknown state "minikube": docker inspect minikube --format={{.State.Status}}: exit status 1
stdout:

stderr:
Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State"
🔥 Creating docker container (CPUs=2, Memory=2200MB) ...
😿 Failed to start docker container. "minikube start" may fix it: recreate: creating host: create: creating: create kic node: create container: docker run -d -t --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=2200mb -e container=docker --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 --publish=127.0.0.1::5000 docker.pkg.github.com/kubernetes/minikube/kicbase:v0.0.10: exit status 125
stdout:

stderr:
Unable to find image 'docker.pkg.github.com/kubernetes/minikube/kicbase:v0.0.10' locally
docker: Error response from daemon: unauthorized: Your token has not been granted the required scopes to execute this query. The 'name' field requires one of the following scopes: ['read:packages'], but your token has only been granted the: [''] scopes. Please modify your token's scopes at: https://github.com/settings/tokens.
See 'docker run --help'.

💣 error provisioning host: Failed to start host: recreate: creating host: create: creating: create kic node: create container: docker run -d -t --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /run -v /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label name.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume minikube:/var --cpus=2 --memory=2200mb -e container=docker --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22 --publish=127.0.0.1::2376 --publish=127.0.0.1::5000 docker.pkg.github.com/kubernetes/minikube/kicbase:v0.0.10: exit status 125
stdout:

stderr:
Unable to find image 'docker.pkg.github.com/kubernetes/minikube/kicbase:v0.0.10' locally
docker: Error response from daemon: unauthorized: Your token has not been granted the required scopes to execute this query. The 'name' field requires one of the following scopes: ['read:packages'], but your token has only been granted the: [''] scopes. Please modify your token's scopes at: https://github.com/settings/tokens.
See 'docker run --help'.

😿 minikube is exiting due to an error. If the above message is not useful, open an issue:
👉 https://github.com/kubernetes/minikube/issues/new/choose
$
Full output of minikube start command used, if not already included:

Optional: Full output of minikube logs command:

@afbjorklund
Copy link
Collaborator

Same original issue as #8124, and will probably be fixed by #8144

It's a little disappointing that not even logging in helped here...

@afbjorklund afbjorklund added co/docker-driver Issues related to kubernetes in container triage/duplicate Indicates an issue is a duplicate of other open issue. labels May 15, 2020
@medyagh
Copy link
Member

medyagh commented May 15, 2020

@yc-alex-xu
can you try to login to github using:

"docker login docker.pkg.github.com"

you will need to have an account in github and enter your username and password

@medyagh medyagh changed the title minikube start --driver=docker failed github packages needs login for failure over image May 15, 2020
@medyagh medyagh added the needs-solution-message Issues where where offering a solution for an error would be helpful label May 15, 2020
@medyagh
Copy link
Member

medyagh commented May 15, 2020

I will close this issue in favor of #8124
please comment in this issue for information

@medyagh medyagh closed this as completed May 15, 2020
@spiderGX
Copy link

when using minikube start --driver=docker

  • Starting control plane node minikube in cluster minikube
  • docker "minikube" container is missing, will recreate.
    E0521 10:14:25.868786 1912 oci.go:79] docker daemon seems to be stuck. Please try restarting your docker. Will try toelete anyways: unknown state "minikube": docker inspect minikube --format={{.State.Status}}: exit status 1
    stdout:

stderr:
Template parsing error: template: :1:8: executing "" at <.State.Status>: map has no entry for key "State"

  • Creating docker container (CPUs=2, Memory=8000MB) ...
    ! StartHost failed, but will try again: recreate: creating host: create: creating: create kic node: create container: doer run -d -t --privileged --security-opt seccomp=unconfined --security-opt apparmor=unconfined --tmpfs /tmp --tmpfs /runv /lib/modules:/lib/modules:ro --hostname minikube --name minikube --label created_by.minikube.sigs.k8s.io=true --label me.minikube.sigs.k8s.io=minikube --label role.minikube.sigs.k8s.io= --label mode.minikube.sigs.k8s.io=minikube --volume nikube:/var --cpus=2 --memory=8000mb -e container=docker --expose 8443 --publish=127.0.0.1::8443 --publish=127.0.0.1::22-publish=127.0.0.1::2376 --publish=127.0.0.1::5000 : exit status 125
    stdout:

stderr:
/usr/bin/docker-current: Error parsing reference: "" is not a valid repository/tag: repository name must have at least o component.
See '/usr/bin/docker-current run --help'.

below images is pulled :
gcr.io/k8s-minikube/kicbase v0.0.10 e6bc41c39dc4 3 weeks ago 974 MB

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container needs-solution-message Issues where where offering a solution for an error would be helpful triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

4 participants