GoogleCloudPlatform/gke-autoneg-controller

Failed to pull image from docker.pkg.github.com: no basic auth credentials

Closed this issue · 3 comments

Hi,

Thank you for the nice tool, successfully using it for NEG autopopulation.

After trying to switch to the most recent published version as a release, it is actually not possible to pull the image from the registry:

Events:
  Type     Reason     Age                   From               Message
  ----     ------     ----                  ----               -------
  Normal   Scheduled  19m                   default-scheduler  Successfully assigned autoneg-system/autoneg-controller-manager-758bc7f94b-tzvz9 to gke-d003-sb2-k8s-euwe1-node-pool-1-e0234f93-8c4q
  Normal   Pulling    19m                   kubelet            Pulling image "gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0"
  Normal   Started    19m                   kubelet            Started container kube-rbac-proxy
  Normal   Pulled     19m                   kubelet            Successfully pulled image "gcr.io/kubebuilder/kube-rbac-proxy:v0.4.0" in 1.270493418s
  Normal   Created    19m                   kubelet            Created container kube-rbac-proxy
  Warning  Failed     18m (x3 over 19m)     kubelet            Failed to pull image "docker.pkg.github.com/googlecloudplatform/gke-autoneg-controller/gke-autoneg-controller:0.9.1": rpc error: code = Unknown desc = Error response from daemon: Get https://docker.pkg.github.com/v2/googlecloudplatform/gke-autoneg-controller/gke-autoneg-controller/manifests/0.9.1: no basic auth credentials

It should not be behind basic auth, should it?
Should not it be published to gcr.io registry instead?..

Thanks Artem - I'll take a look as soon as I can.

rosmo commented

The Docker registry GitHub has requires authentication and doesn't support anonymously pulling public images. GitHub is in the process of migrating to GitHub Container Registry (ghcr.io), which will allow anonymous pulls, but it seems this happens automatically for projects and Autoneg hasn't been updated yet. I can't find a manual process to migrate, so looks like we're going to have to wait a while.

Ref: https://docs.github.com/en/packages/working-with-a-github-packages-registry/migrating-to-the-container-registry-from-the-docker-registry?algolia-query=actions#how-can-you-tell-if-your-images-have-been-migrated

@artazar I believe this is now fixed. We have a new CI pipeline which publishes packages to the new location github package location.

I've made a new commit with the container location pointing to ghcr.io/googlecloudplatform/gke-autoneg-controller/gke-autoneg-controller:0.9.2-dev in deploy/autoneg.yaml.