watchtower icon indicating copy to clipboard operation
watchtower copied to clipboard

ghcr Private Repo Issue

Open derrobin154 opened this issue 2 years ago • 2 comments

Describe the bug

I become a 404 Error because the URL what Watchtower tries to reach is unavailable.

Steps to reproduce

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior

That WatchTower checks the repo and loads updates.

Screenshots

No response

Environment

  • Platform Synology DSM
  • Architecture x64
  • Docker Version 20.10.23

Your logs

2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="No new images found for /ghcr-io-derrobin154-lurchbot-1"
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="No pull needed. Skipping image."
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Found a match"
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg=Comparing local="sha256:81c94cc8d71a4763316bd6623ee89e981d37936bdb7cc9eb76485a31bd44ee81" remote="sha256:81c94cc8d71a4763316bd6623ee89e981d37936bdb7cc9eb76485a31bd44ee81"
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Found a remote digest to compare with" remote="sha256:81c94cc8d71a4763316bd6623ee89e981d37936bdb7cc9eb76485a31bd44ee81"
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Doing a HEAD request to fetch a digest" url="https://ghcr.io/v2/derrobin154/lurchbot/manifests/master"
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Parsing image ref" host=ghcr.io image=derrobin154/lurchbot normalized="ghcr.io/derrobin154/lurchbot:master" tag=master
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Credentials found."
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Setting scope for auth token" image=ghcr.io/derrobin154/lurchbot scope="repository:ghcr.io/derrobin154/lurchbot:pull"
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Checking challenge header content" realm="https://ghcr.io/token" service=ghcr.io
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Got response to challenge request" header="Bearer realm=\"https://ghcr.io/token\",service=\"ghcr.io\",scope=\"repository:user/image:pull\"" status="401 Unauthorized"
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Building challenge URL" URL="https://ghcr.io/v2/"
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Checking if pull is needed" container=/ghcr-io-derrobin154-lurchbot-1 image="ghcr.io/derrobin154/lurchbot:master"
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Credentials loaded"
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Got image name: ghcr.io/derrobin154/lurchbot:master"
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Loaded auth credentials for user derrobin154, on registry ghcr.io/derrobin154/lurchbot:master, from file /config.json"
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Trying to load authentication credentials." container=/ghcr-io-derrobin154-lurchbot-1 image="ghcr.io/derrobin154/lurchbot:master"
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Retrieving running, stopped and exited containers"
2023/07/27 16:32:23	stderr	time="2023-07-27T14:32:23Z" level=debug msg="Checking containers for updated images"

Additional context

I take the Auth Config from docker login and put it in config.json.

I also have the Problem, i download ex. the Watchtower Image from DockerHub over DSM and in Watchtower i become this error:

2023/07/27 16:32:27 | stderr | time="2023-07-27T14:32:27Z" level=debug msg="No credentials for containrrr found" config_file=/config.json
2023/07/27 16:32:27 | stderr | time="2023-07-27T14:32:27Z" level=debug msg="Trying to load authentication credentials." container=/watchtower image="containrrr/watchtower:latest"

because the Image name is containerrr/watchtower and in the config.json containerrr is not set because it is from dockerhub.

derrobin154 avatar Jul 27 '23 14:07 derrobin154

Hi there! 👋🏼 As you're new to this repo, we'd like to suggest that you read our code of conduct as well as our contribution guidelines. Thanks a bunch for opening your first issue! 🙏

github-actions[bot] avatar Jul 27 '23 14:07 github-actions[bot]

None of these are errors. The level=debug indicates that those are just debug messages, and should not be treated as errors. The last messages for example, just tells you that it cannot find any explicit credentials for watchtower, so it just goes ahead and pulls it using public authentication. It's not an error, but nice information to have if you were trying to debug why it didn't use the credentials you expected etc.

piksel avatar Jul 28 '23 09:07 piksel