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

Unauthorized from pulling Docker rolling-tutorial image from ghcr.io (GitHub container registry) #918

Closed
ukicomputers opened this issue Jul 3, 2024 · 6 comments · Fixed by #989
Labels
bug Something isn't working

Comments

@ukicomputers
Copy link
Contributor

Description

Hi! This is my first time to try MoveIt 2 for myself! As now, I use Docker for almost anything, because it keeps dependencies and software clean, working and OK like ROS 2. I started with tutorial on How to Set Up MoveIt 2 Docker Containers in Ubuntu. I got the Docker Compose script, executed command docker compose run ..., and Docker started pulling from ghcr.io (GitHub container registry). After few seconds, I got error: Head unauthorized (please see console output). Did anyone encountered this problem, or it is just me? Thanks!

Your environment

  • ROS Distro: Rolling (but also, I tried with Jazzy, and it is not working)
  • OS Version: Ubuntu 24.04 (codename noble)
  • Using moveit2_container with image rolling-tutorial binary build from ghcr.io (Docker compose script)
  • Rolling

Steps to reproduce

wget https://raw.githubusercontent.com/ros-planning/moveit2_tutorials/main/.docker/docker-compose.yml
DOCKER_IMAGE=rolling-tutorial docker compose run --rm --name moveit2_container cpu

Expected behaviour

While pulling image, I got Error response from daemon: Head unauthorized (see console output).

Backtrace or Console output

When running docker compose run (see steps to reproduce):

[+] Running 1/1
 ✘ cpu Error Head "https://ghcr.io/v2/moveit/moveit2_tutorials/manifests/rolling-tutorial": unauthorized                                      1.8s 
Error response from daemon: Head "https://ghcr.io/v2/moveit/moveit2_tutorials/manifests/rolling-tutorial": unauthorized
@ukicomputers
Copy link
Contributor Author

I just saw, (moveit/moveit2#1895) is probably related to this issue.

@ukicomputers
Copy link
Contributor Author

Also, when logged in with GitHub API token for ghcr.io in Docker, I get this (different) error now:

[+] Running 1/1
 ✘ cpu Error denied                                                                                                                           3.1s 
Error response from daemon: denied

ghcr.io credentials are not the problem

@MartinsSmirnovs
Copy link

MartinsSmirnovs commented Jul 12, 2024

+1, I tried to go through tutorials using Docker (because manually built nodes crashed on startup despite the successful build) and got unauthorized error.

Update:
I found a workaround. There is a working humble-tutorial image available in Dockerhub, so you can just update image section of docker-compose.yml:

# Example command:
#   Humble on a Nvidia system:
#   DOCKER_IMAGE=humble-tutorial docker compose run gpu
#   Rolling without discrete graphics:
#   DOCKER_IMAGE=rolling-tutorial docker compose run cpu

services:
  cpu:
    image: rakeshshrestha/moveit2_tutorials:humble-tutorial
    container_name: moveit2_container
    privileged: true
    network_mode: host
    command: /bin/bash
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix
    environment:
      QT_X11_NO_MITSHM: 1
      DISPLAY: $DISPLAY
  gpu:
    image: rakeshshrestha/moveit2_tutorials:humble-tutorial
    container_name: moveit2_container
    privileged: true
    network_mode: host
    command: /bin/bash
    deploy:
      resources:
        reservations:
          devices:
            - driver: nvidia
              count: 1
              capabilities: [gpu]
    volumes:
      - /tmp/.X11-unix:/tmp/.X11-unix
    environment:
      QT_X11_NO_MITSHM: 1
      DISPLAY: $DISPLAY
      NVIDIA_VISIBLE_DEVICES: all
      NVIDIA_DRIVER_CAPABILITIES: all

Note that I have removed XAUTHORITY part as I did not have such variable set (possibly because I use WSL2). I also could not start gpu container due to some error, despite going through Nvidia drivers for Docker tutorial. CPU container works as expected, and successfully runs rviz.

Update 2:
Rviz main screen is black. Cannot get it to work.

Update 3:
Got the workaround to work by creating a different user in the container.

@pta-janssen
Copy link

+1, experiencing the same behavior as the issue initiator @ukicomputers.

@scrv
Copy link

scrv commented Nov 11, 2024

+1, facing the same unauthorized request

@sea-bass
Copy link
Contributor

Fixed in #989

@github-project-automation github-project-automation bot moved this to ✅ Done in MoveIt Nov 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants