Skip to content

Instantly share code, notes, and snippets.

@nerdlich
Created April 20, 2026 01:47
Show Gist options
  • Select an option

  • Save nerdlich/c84625b31ead86d3ffcff2a6bcc85d03 to your computer and use it in GitHub Desktop.

Select an option

Save nerdlich/c84625b31ead86d3ffcff2a6bcc85d03 to your computer and use it in GitHub Desktop.
$ docker pull gitea.mydomain.com/tom/caddy:latest
Error response from daemon: Head "https://gitea.mydomain.com/v2/tom/caddy/manifests/latest": no basic auth credentials
Gitea Logs (Trace):
2026/04/19 21:39:48 modules/process/manager.go:185:(*Manager).Add() [T] Start 69e583e4: HTTP: GET /v2/ (request)
2026/04/19 21:39:48 HTTPRequest [T] router: started GET /v2/ for 100.65.64.45:0
2026/04/19 21:39:48 HTTPRequest [I] router: completed GET /v2/ for 100.65.64.45:0, 401 Unauthorized in 2.7ms @ container/container.go:134(container.ReqContainerAccess)
2026/04/19 21:39:48 modules/process/manager.go:233:(*Manager).remove() [T] Done 69e583e4: HTTP: GET /v2/
2026/04/19 21:39:48 modules/process/manager.go:185:(*Manager).Add() [T] Start 69e583e4-2: HTTP: GET /v2/token?scope=repository%3Atom%2Fcaddy%3Apull&service=container_registry (request)
2026/04/19 21:39:48 HTTPRequest [T] router: started GET /v2/token?scope=repository%3Atom%2Fcaddy%3Apull&service=container_registry for 100.65.64.45:0
2026/04/19 21:39:48 HTTPRequest [I] router: completed GET /v2/token?scope=repository%3Atom%2Fcaddy%3Apull&service=container_registry for 100.65.64.45:0, 200 OK in 0.4ms @ container/container.go:157(container.Authenticate)
2026/04/19 21:39:48 modules/process/manager.go:233:(*Manager).remove() [T] Done 69e583e4-2: HTTP: GET /v2/token?scope=repository%3Atom%2Fcaddy%3Apull&service=container_registry
2026/04/19 21:39:50 modules/process/manager.go:185:(*Manager).Add() [T] Start 69e583e6: HTTP: POST /api/actions/runner.v1.RunnerService/FetchTask (request)
2026/04/19 21:39:50 HTTPRequest [T] router: started POST /api/actions/runner.v1.RunnerService/FetchTask for 100.65.64.45:0
2026/04/19 21:39:50 HTTPRequest [T] router: completed POST /api/actions/runner.v1.RunnerService/FetchTask for 100.65.64.45:0, 200 OK in 9.8ms @ <autogenerated>:1(http.Handler.ServeHTTP-fm)
2026/04/19 21:39:50 modules/process/manager.go:233:(*Manager).remove() [T] Done 69e583e6: HTTP: POST /api/actions/runner.v1.RunnerService/FetchTask
@nerdlich
Copy link
Copy Markdown
Author

curl from remote host (caddy in front of gitea):

curl -I https://gitea.mydomain.com/v2/tom/caddy/manifests/latest
HTTP/2 401
alt-svc: h3=":443"; ma=2592000
content-type: application/json
date: Mon, 20 Apr 2026 01:53:49 GMT
docker-distribution-api-version: registry/2.0
via: 1.1 Caddy
www-authenticate: Bearer realm="https://gitea.int.myhosts.cc/v2/token",service="container_registry",scope="*"
www-authenticate: Basic realm="Gitea Container Registry"
content-length: 49

curl inside docker container (no reverse proxy):

curl -I http://localhost:3000/v2/tom/caddy/manifests/latest
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0    49   0     0   0     0     0     0  --:--:-- --:--:-- --:--:--     0
HTTP/1.1 401 Unauthorized
Content-Type: application/json
Docker-Distribution-Api-Version: registry/2.0
Www-Authenticate: Bearer realm="http://localhost:3000/v2/token",service="container_registry",scope="*"
Www-Authenticate: Basic realm="Gitea Container Registry"
Date: Mon, 20 Apr 2026 01:54:48 GMT
Content-Length: 49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment