Skip to content

🐞 Dagger engine container is unable to refresh authorization for Google Artifact Registry #4698

@davidwallacejackson

Description

@davidwallacejackson

What is the issue?

I was working on a script with the Go SDK, running it repeatedly to test pushes to a registry, when I suddenly got this error:

input:1: container.withDirectory.publish failed to solve: failed to push [PATH REDACTED]: unexpected status from HEAD request to https://[PATH REDACTED]: 401 Unauthorized
       
       Please visit https://dagger.io/help#go for troubleshooting guidance.

The time was just after midnight, so I figured some automated process had logged me out or revoked my permissions. I tried a push using the docker CLI and found that I was still able to push. On a hunch, I then deleted the docker container for the Dagger engine and re-ran -- at which point my script was able to push again.

Log output

No response

Steps to reproduce

Log into Google Artifact Registry with gcloud, e.g.

gcloud auth login
gcloud auth configure-docker us-central1-docker.pkg.dev

Run a dagger script that Publish()s a container to a repository that you have write access to. Then wait until after midnight (not sure if it's local midnight or PST), and run the script again.

SDK version

Go SDK 0.4.6

OS version

macOS 12.3.1 (ARM)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions