GoogleContainerTools / GoogleContainerTools/skaffold

Recognize Docker buildkit authorization error

Open
#6,953 0 comments 0 reactions 0 assignees View on GitHub
area/errors build/docker kind/todo needs-actionable-error
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

Seen on [StackOverflow](https://stackoverflow.com/questions/70288986/why-am-i-getting-this-error-error-internal-load-metadata): a user encountered an authorization error attempting to access GCR using a Buildkit build. From the Skaffold output, it looks like we didn't recognize the authorization failure and may be marking it as an internal error.

```
Building [gcr.io/xxx/media]...
[+] Building 2.8s (4/4) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 37B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/alpine:3.14 1.2s
=> ERROR [internal] load metadata for gcr.io/xxx/service-base:xxx 2.6s
------
> [internal] load metadata for gcr.io/xxx/service-base:xxx:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: unexpected status code [manifests xxx]: 401 Unauthorized
Building [gcr.io/xxx/api]...
Canceled build for gcr.io/xxx/api
exit status 1. Docker build ran into internal error. Please retry.
If this keeps happening, please open an issue..
make: *** [dev-services] Error 1

```
### Information

- Skaffold version:
- Operating system:
- Installed via:
- Contents of skaffold.yaml:

```yaml

```

### Steps to reproduce the behavior

1. a clonable repository with the sample skaffold project
2. `skaffold `
3. ...

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.