New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"GET https://example.com/users/sign_in: unexpected status code 200 OK" when pushing to self-hosted GitLab with Kaniko #3146
Comments
Here are the
|
I'm trying to compile a modified version of Kaniko for debugging purposes:
How can I build a |
I was able to add busybox with an extra
Which allowed me to run my locally compiled version with GitLab. I'm still not sure why Kaniko is failing to log in though. |
I added and used the following debug patch to Kaniko:
Which prints the following, when adding a container name to the command, which should be necessary because we need more levels in the URL path:
The destination URL is correct. I get the same error with and without a the following in
|
I found a workaround for this issue: explicitly enter the registry URL so it's possible to leave off the port number
It may also be possible to configure GitLab to not include the port in the
I haven't tested that yet, because our dev instance is currently facing another issue. In any case, you'll still likely need to add something like |
Actual behavior
When attempting to publish a Kaniko-built image to a self-hosted GitLab server (which I'll call example.com in this issue), we get the following error:
The build stage is successful if we provide
--no-push
. It looks like what might be happening here is that as Kaniko tries logging into the registry at registry-example.com/v2/, and it at some point decides to visit example.com. That automatically redirects it to the user login page, which doesn't contain the expected data. (Our GitLab instance requires a login to view the/
path on that site, but other public groups and repos are visible if you know their URLs).I looked at the output of the
env
command in our runner, and that shows some entries that contain 'example.com', but it's not clear whether any of those are influencing Kaniko's behavior.Is Kaniko looking for some data on the main page of our GitLab instance?
Expected behavior
The expected behavior is for Kaniko to log into the container registry, so it can push an image to it.
To Reproduce
Steps to reproduce the behavior:
Additional Information
gcr.io/kaniko-project/executor:v1.22.0-debug
(likelyc7c1f8d3d464
)Dockerfile
:.gitlab-ci.yml
:Triage Notes for the Maintainers
--cache
flagThe text was updated successfully, but these errors were encountered: