Troubleshooting · Templates
Build authentication error
If grotte template build fails with a Docker login or push authentication error, this page is for you.
What you're seeing
A v1 build fails partway through with one of:
Error response from daemon: Get "https://docker.<your-domain>/v2/":
unauthorized: authentication required
denied: requested access to the resource is denied
The build gets through docker build but blows up at docker push. The
CLI usually falls back to a local proxy attempt before surfacing this
error.
What's going on
grotte template build runs docker login docker.<your-domain> -u _grt_access_token --password-stdin against your GROTTE access token
before pushing. Some Docker daemon configurations (corp Docker Desktop
with credential helpers, rootless docker, fresh installs without
~/.docker/config.json) refuse to persist that login or refuse to use
it for the subsequent push.
When the direct push fails, the CLI tries a local-proxy fallback —
buildWithProxy opens a server on port 49984 that re-tags the image
to localhost:49984/... and proxies the registry calls with an
explicit Authorization header on every request. That avoids the
docker daemon's credential store entirely.
The workaround
-
Check
~/.docker/config.json. If the file is missing or empty, create it with{}so docker login has somewhere to write. IfcredsStoreorcredHelpersis set to a value docker can't invoke (osxkeychainon a headless mac,secretservicewithout the service installed), remove those entries. -
Ensure port
49984is free on your machine. The CLI's proxy fallback binds to it. Lsof or netstat will show what's holding it:bashlsof -i :49984 # or ss -tlnp | grep :49984 -
Re-run
grotte template build. When the firstdocker pushfails, the CLI prompts:Have you completed the steps from the workaround guide?
Confirm
Y— the proxy fallback then takes over and pushes vialocalhost:49984with the explicit auth header. -
(Optional) suppress the prompt next time by setting the
dockerProxySetflag in your user config at~/.grotte/config.json:json{ "dockerProxySet": true }The CLI writes this automatically on first successful proxy push, so you only see the prompt once per machine.
Still stuck?
- If
lsof -i :49984shows the proxy is running but the push still fails, the issue is upstream of the CLI — check thatdocker.<your-domain>is actually reachable and serving a v2 registry API at/v2/. - If you're on the managed GROTTE deployment, you shouldn't be running
this flow at all. Switch to
grotte template createor build via the dashboard. - File a bug at github.com/parallactic-ai/grotte-sdk
with the full error output, your platform, and your docker version
(
docker version).