1

I've got docker running on my DigitalOcean droplet and I'm trying to pull in images from my gitlab repository using watchtower. I'm using pass (sudo apt-get install pass) to manage the credentials and here is my config.json file:

{
        "auths": {
                "registry.gitlab.com": {}
        },
        "HttpHeaders": {
                "User-Agent": "Docker-Client/18.09.6 (linux)"
        },
        "credsStore": "pass",
        "credHelpers": {
                "registry.gitlab.com": "pass"
        }

I'm getting the following errors when I look at watchtower logs:

watchtower    | time="2020-10-16T14:24:36Z" level=debug msg="Pulling registry.gitlab.com/myuser/myrepo/image:latest for /image"
watchtower    | time="2020-10-16T14:24:36Z" level=debug msg="Loaded auth credentials for user , on registry registry.gitlab.com/myuser/myrepo/image:latest, from file /config.json"
watchtower    | time="2020-10-16T14:24:36Z" level=debug msg="Got image name: registry.gitlab.com/myuser/myrepo/image:latest"
watchtower    | time="2020-10-16T14:24:36Z" level=debug msg="Error pulling image registry.gitlab.com/myuser/myrepo/image:latest, Error response from daemon: Get https://registry.gitlab.com/v2/myuser/myrepo/image/manifests/latest: denied: access forbidden"

This is my watchtower config for docker-compose:

  watchtower:
    image: containrrr/watchtower
    container_name: watchtower
    restart: always
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ~/.docker/config.json:/config.json
    command: --interval 30 --cleanup

Something strange I noticed in those logs is this bit: Loaded auth credentials for user ,. It's almost as if it cannot read some sort of a user.

Bravi
  • 713
  • 2
  • 8
  • 29
  • Hi did you had this issue solved?, if so, may I ask how? – JamesHudson81 Mar 20 '21 at 12:45
  • 1
    Hi, sorry for a very late reply. No I couldn't figure it out so I just left it without `pass`. It basically uses a default auth system, which will just base64 encode your credentials and save them under `config.json`. Bad decision, but couldn't find a solution. – Bravi Apr 05 '21 at 19:06

0 Answers0