This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

2
Private image on ghcr.io Always Denied: Unauthorized
Post Body

I'm stuck trying to get the most basic private docker repository at ghcr.io to download images into minikube.

I've got a token that works for docker from github. I set the token to write:packages, delete:packages, and along the way that picks up read:packages. I followed these instructions: https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry

What I CAN do:

- Upload docker image with the token. It's Alpine with a couple of extra packages.

- Docker pull image using the *exact* url from the kubernetes file and the token.

- docker log out, then docker log into the repo with the token.

What I've tried:- Added secrets to the namespace, specified them in the pod file.- Used directions from here to create the secret: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/

What I cannot do:Deploy a pod with the image.Error message:Error response from daemon: Head "https://ghcr.io/v2/my-user-name/my-prometheus/manifests/1.0": unauthorized

apiVersion: v1

kind: Pod

metadata:

name: private-reg

namespace: monitoring

spec:

containers:

- name: foo

image: ghcr.io/marquis-of-sandwiches/mp-prometheus:1.0

imagePullSecrets:

- name: regcred1

Here's logging from kubectl describe pod

Warning  Failed     30m (x4 over 31m)     kubelet            Failed to pull image "ghcr.io/my-user-name/my-prometheus:1.0": rpc error: code = Unknown desc = Error response from daemon: Head "https://ghcr.io/v2/my-user-name/my-prometheus/manifests/1.0": unauthorized Warning  Failed     30m (x4 over 31m)     kubelet            Error: ErrImagePull Warning  Failed     30m (x6 over 31m)     kubelet            Error: ImagePullBackOff

Any ideas would be great

Author
Account Strength
100%
Account Age
9 years
Verified Email
Yes
Verified Flair
No
Total Karma
18,939
Link Karma
2,534
Comment Karma
16,311
Profile updated: 2 days ago
Posts updated: 9 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
10 months ago