Unable to pull docker image for pixel streaming on Linux server - docker

I am unable to pull docker image for pixel streaming on Linux server.
[root#server~]# docker pull ghcr.io/epicgames/pixel-streaming-signalling-server:4.27.2
Error response from daemon: unauthorized
When I tried docker login it returns "Login Succeeded", but I am still unable to download the image.
[root#server~]# echo $CR_PAT | docker login ghcr.io -u <username> --password-stdin
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store
Login Succeeded

After 2 days of research, I found out that the GitHub personal access token did not have sufficient rights to download the image. After modifying these rights, I was able to download this image.

Related

Able to pull acr images but unable to check manifest

I want help in understanding how docker pull works for acr images. I have a private acr repository.
So i run az acr login -n <repo> --expose-token --output tsv --query accessToken to print out the access token.
Then i use this access token to login through docker: docker login <repo>.azureacr.io --username 00000000-0000-0000-0000-000000000000 --password '<ACCESS TOKEN>'. The login works.
Then i try pulling the docker image: docker pull <image>:<tag> which works, but when i do docker manifest inspect <image>:<tag> it fails with the following exception:
errors:
denied: requested access to the resource is denied
unauthorized: authentication required
Questions:
How do i check what permissions I have/need to run these docker commands?
If docker pull is working is it wrong to assume docker manisfest inspect will also work? I mean docker somehow needs to check if the image with the tag exists before pulling it right?

Docker Hub login failed with status 404 Not Found

I am trying to login to Docker hub and pull an image. I tried for example
docker login store.docker.com
Username: myusername
Password: *****
Error response from daemon: login attempt to https://store.docker.com/v2/ failed with status: 404 Not Found
And I tried
docker login hub.docker.com
Username: myusername
Password: ***
Error response from daemon: login attempt to https://hub.docker.com/v2/ failed with status: 404 Not Found
So both store.docker.com and hub.docker.com produce an error 404 not found. I can log in to https://hub.docker.com using a browser using myusername. So my account looks fine.
What is the secret to pulling images from Docker hub? Is there an instruction, tutorial or training that describes the details of pulling and uploading images?
I am on Ubuntu 18.04. I can pull and push images to my own registry but somehow I lost the ability to pull from Docker hub when it no longer allowed anonymous pull requests.
[myuser:~] 130 $ docker --version
Docker version 18.09.1, build 4c52b90
As a workaround, is there a way to download images files? So I can upload to my own registry?
You should just write
docker login
If you specify the url, you should use https://index.docker.io. hub.docker.com and store.docker.com no longer work.

Why is docker login not working with correct credentials?

I'm trying to do docker login on a linux box. I'm using my docker hub username 'undrewb' and the password I use to login to hub.docker.com. Why isnt this working? I'm not signed into a GUI and docker logout tells me I'm not logged in.
drewb#workbox:~$ sudo docker login
Login with your Docker ID to push and pull images from Docker Hub. If you don't have a Docker ID, head over to https://hub.docker.com to create one.
Username: undrewb
Password:
Error response from daemon: Get https://registry-1.docker.io/v2/: unauthorized: incorrect username or password
For some reason, changing my password on dockerhub allowed me to proceed.

Not able to sign in using docker to canister.io - Authorization server did not include a token in the response

Ok so I'm trying to make Bitbucket build a docker image using Bitbucket pipelines and I could sign in a week ago but now it doesn't work anymore.
And I'm using the same username and password, here it's a list of the commands I have tried and their output.
docker login cloud.canister.io:5000 --username $CANISTER_USERNAME --password $CANISTER_PASSWORD:
Error response from daemon: Get https://cloud.canister.io:5000/v2/: authorization server did not include a token in the response
docker login --username $CANISTER_USERNAME --password $CANISTER_PASSWORD cloud.canister.io:5000
Error response from daemon: Get https://cloud.canister.io:5000/v2/: authorization server did not include a token in the response
docker login cloud.canister.io:5000 --username $CANISTER_USERNAME
Password: xxxxxxxxxxxxxxxxxxx
Error saving credentials: error storing credentials - err: exit status 1, out: Cannot autolaunch D-Bus without X11 $DISPLAY
echo "$CANISTER_PASSWORD" | docker login cloud.canister.io:5000 --username $CANISTER_USERNAME --password-stdin
Error response from daemon: Get https://cloud.canister.io:5000/v2/: authorization server did not include a token in the response
echo "$CANISTER_PASSWORD" | docker login --username $CANISTER_USERNAME --password-stdin cloud.canister.io:5000
Error response from daemon: Get https://cloud.canister.io:5000/v2/: authorization server did not include a token in the response
I've also tried on a local machine and tried to do it without environment variables also tried to sign out and then try to sign in again but nothing works
for logging in this worked for me:
docker login --username=USERNAME cloud.canister.io:5000
Unfortunately, i am still getting this error message whenever i try to push my image.
I had the same issue when trying to push a new image to cloud.canister.io. It turned out I had not created the repository through the web frontend yet.
After creating the repo on cloud.canister.io I could successfully push my image up.
First you need to create an empty repo on cloud.canister.io
website with same name of the image you are trying to push.
Then you will be able to push to that repo.
Make sure you have authenticated the canister account using
sudo docker login --username=<username> cloud.canister.io:5000
Been a while. But this helped me:
docker push (registryFullUrl)/$(dockerId)/$(imageName):$(MAJOR).$(MINOR).$(PATCH)
where:
$(registryFullUrl) = cloud.canister.io:5000
$(dockerId) = your canister id
$(imageName) = repository name
$(MAJOR).$(MINOR).$(PATCH) = version
This worked for me. Hopefully this will be helpful to somebody.
I built an image from a custom Dockerfile. I am running Docker Desktop on my Win11.
docker build -t <image>:<tag> .
I logged into canister.io.
docker login --username=<username> --password=<username> cloud.canister.io:5000
I tagged the build.
docker tag <image>:<tag> cloud.canister.io:5000/<canister-namespace>/<canister-repo>
I pushed the image to canister.
docker push cloud.canister.io:5000/<canister-namespace>/<canister-repo>
I deleted the image from my Docker Desktop and I tried to pull it from canister.
docker pull cloud.canister.io:5000/<canister-namespace>/<canister-repo>
Here's an examples with some dummy values:
docker build -t tc5:tc5tag .
docker login --username=myusername --password=mypassword cloud.canister.io:5000
docker tag tc5:tc5tag cloud.canister.io:5000/mynamespace/testrepo
docker push cloud.canister.io:5000/mynamespace/testrepo
# pull test
docker pull cloud.canister.io:5000/mynamespace/testrepo

What's causing authentication error when pushing Docker image to Google Container Registry?

I am trying to push a Docker image to Google Container Registry from a CircleCI build, as per their instructions. However, pushing to GCR fails due to an apparent authentication error:
Using 'push eu.gcr.io/realtimemusic-147914/realtimemusic-test/realtimemusic-test' for DOCKER_ARGS.
The push refers to a repository [eu.gcr.io/realtimemusic-147914/realtimemusic-test/realtimemusic-test] (len: 1)
Post https://eu.gcr.io/v2/realtimemusic-147914/realtimemusic-test/realtimemusic-test/blobs/uploads/: token auth attempt for registry: https://eu.gcr.io/v2/token?account=oauth2accesstoken&scope=repository%3Arealtimemusic-147914%2Frealtimemusic-test%2Frealtimemusic-test%3Apush%2Cpull&service=eu.gcr.io request failed with status: 403 Forbidden
I've prior to pushing the Docker image authenticated the service account against Google Cloud:
echo $GCLOUD_KEY | base64 --decode > ${HOME}/client-secret.json
gcloud auth activate-service-account --key-file ${HOME}/client-secret.json
gcloud config set project $GCLOUD_PROJECT_ID
Then I build the image and push it to GCR:
docker build -t $EXTERNAL_REGISTRY_ENDPOINT/realtimemusic-test -f docker/test/Dockerfile .
gcloud docker push -- $EXTERNAL_REGISTRY_ENDPOINT/realtimemusic-test
What am I doing wrong here?
Have you tried using the _json_key method for authenticating with Docker?
https://cloud.google.com/container-registry/docs/advanced-authentication
After that, please use naked 'docker' (without 'gcloud').
If you are pushing docker image using google cloud sdk. You can use temporary authorization with the following command:
gcloud docker --authorize-only
The above command gives you a temporary authorization for pushing and pulling images using docker.
You can refer this link for details Gcloud docker.
Hope it helps to solve your issue.
After many retries... I solved using access token:
gcloud auth print-access-token | docker login -u oauth2accesstoken --password-stdin https://[HOSTNAME]
The service account requires permission to write to the Cloud Storage bucket containing the container registry. Granting the service account either the project editor role or write access to the bucket (via ACL) solves the issue. The latter should be preferable since the account doesn't receive wider permissions than it needs.

Resources