GoogleContainerTools / GoogleContainerTools/skaffold

Skaffold can't push to remote private registry.

Open
#7,231 2 comments 0 reactions 0 assignees View on GitHub
kind/bug priority/awaiting-more-evidence triage/needs-information
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

### Expected behavior
The image should be built and pushed to the remote registry.

### Actual behavior
The output of `skaffold run` is as follows

> WARN[0000] failed to detect active kubernetes cluster node platform. Specify the correct build platform in the `skaffold.yaml` file or using the `--platform` flag subtask=-1 task=DevLoop
> Generating tags...
> - registry.a.com:5000/b/c/d -> registry.a.com:5000/b/c/d:4.5.5-265-g0186190-dirty
> Checking cache...
> - registry.a.com:5000/b/c/d: Not found. Building
> Starting build...
> Building [registry.a.com:5000/b/c/d]...
> [+] Building 1.9s (12/12) FINISHED
> => [internal] load build definition from Dockerfile 0.0s
> => => transferring dockerfile: 38B 0.0s
> => [internal] load .dockerignore 0.0s
> => => transferring context: 34B 0.0s
> => [internal] load metadata for docker.repos.balad.ir/python:3.8 0.0s
> => [1/7] FROM docker.repos.k.com/python:3.8 0.0s
> => [internal] load build context 0.0s
> => => transferring context: 84.57kB 0.0s
> => CACHED [2/7] RUN apt update; apt install -y libev-dev 0.0s
> => CACHED [3/7] ADD requirements.txt /tmp/requirements.txt 0.0s
> => CACHED [4/7] RUN --mount=type=secret,id=ci-job-token git config --global credential.helper store && echo "https://gitlab-ci-token:$(cat 0.0s
> => CACHED [5/7] WORKDIR /home/Libero 0.0s
> => [6/7] ADD . . 0.1s
> => [7/7] RUN pybabel compile -d libero/translations 0.5s
> => exporting to image 1.3s
> => => exporting layers 1.3s
> => => writing image sha256:sha-ommitted-by-me-as-i-wasn't-sure-if-it's-confidentital-or-not 0.0s
> => => naming to registry.a.com:5000/b/c/d:4.5.5-265-g0186190-dirty 0.0s
> The push refers to repository [registry.a.com:5000/b/c/d]
> build [registry.a.com:5000/b/c/d] failed: could not push image "registry.a.com:5000/b/c/d:4.5.5-265-g0186190-dirty": An image does not exist locally with the tag: registry.a.com:5000/b/c/d
>

### Information
- Skaffold version: v1.37.0
- Operating system: Ubuntu 20.04.4 LTS
- Installed via: skaffold.dev
- Contents of skaffold.yaml:

```yaml
apiVersion: skaffold/v2beta28
kind: Config
metadata:
name: libero
build:
local:
useBuildkit: true
artifacts:
- image: registry.a.com:5000/b/c/d
docker:
dockerfile: Dockerfile
deploy:
kubectl:
manifests:
- k8s/canary-real-estate/deployment.yaml
```

### Steps to reproduce the behavior
I'm working with a private GitLab docker registry. I'm not sure which files I should provide, any tips are highly appreciated.

when I run `docker image ls` i can see the image `registry.a.com:5000/b/c/d:4.5.5-265-g0186190-dirty` has been created, so I have no idea why skaffold can't find this image and push it to the remote repository?
I should also note that skaffold is working perfectly fine with some other repositories that I use with this registry.
I have logged in to the Docker registry, and the command `docker push registry.a.com:5000/b/c/d:4.5.5-265-g0186190-dirty` successfully pushes my image to the registry.
The strange thing is that when I run `skaffold run` on the exact same repository in another computer (MacOS Big Sur) Skaffold works fine.

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.