-
Notifications
You must be signed in to change notification settings - Fork 529
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
Pull registry is not getting authenticated #1929
Comments
@balbusm : Hi, |
@balbusm : Sorry, I have another question. In your settings.xml configuration, is the username password for your proxy authentication or for your DockerHub authentication?
Why do you have proxy URL in image name? |
|
Does it work if you set the server id to |
Yes, it works but it's not obvious and not consistent when you compare it to push config. |
@balbusm : Umm, I would appreciate it if you could elaborate your point a little. By push config, are you referring to config in settings.xml or something else. |
I tried configuring my docker daemon to use a local squid proxy and tried building from a private base image from dockerhub but it seems to be working for me. Is proxy using authentication in your case? While doing docker login into |
Let's simplify a scenario.
In both cases push works. So I would expect if I try to pull image during a docker build above cases would work.
I login with |
@balbusm : Thanks a lot for your detailed explanation. I was trying to reproduce your issue by pulling a private dockerhub image as a base image and pushing it to the same dockerhub username; I had provided credentials in my settings.xml. In this case, both push and pull and working. Let me try to reproduce your issue by setting up a local registry. |
The thing is you need a prefix, dockerhub registry doesn't have a prefix. |
By prefix, you mean a domain name? I just tried again by setting up a local docker registry and using a base image based on that. However, I'm struggling to setup a docker registry with TLS. I also tried the abovementioned scenario using a private image on Quay as base image and using I would really appreciate it if you could provide some reproducer as I'm struggling in reproducing this issue. |
@balbusm : May I ask which registry service are you using? (GitLab, Nexus ..?) I can try to create an account there for testing to replicate your scenario. |
I'm pulling from jfrog and pushing to local nexus. |
Okay, so I tried this set up but still couldn't reproduce. I'll explain the steps I followed:
<servers>
<server>
<id>myusername.jfrog.io</id>
<username>myusername@example.com</username>
<password>secret</password>
</server>
<server>
<id>localhost:8083</id>
<username>admin</username>
<password>secret</password>
</server>
</servers>
<jkube.image.name>localhost:8083/%a:%l</jkube.image.name>
Could you please review these and check if I missed anything? |
I cannot reproduce it on free version of JFrog.
|
Hi @balbusm |
Sure, let's do a debugging session. |
@manusa |
I'm sorry I completely missed this. I don't have many meetings on Friday as well. What timezone are you based? What time would be appropriate for you? We usually use Google Meet for video calls. |
Signed-off-by: balbusm <balbusm@gmail.com>
Signed-off-by: balbusm <balbusm@gmail.com>
Signed-off-by: balbusm <balbusm@gmail.com>
Signed-off-by: balbusm <balbusm@gmail.com>
Signed-off-by: balbusm <balbusm@gmail.com> Signed-off-by: balbusm <balbusm@gmail.com> [eclipse-jkube#1929] Formatter changes Signed-off-by: balbusm <balbusm@gmail.com> Fix eclipse-jkube#1929: Fixed broken tests Signed-off-by: balbusm <balbusm@gmail.com> Fix eclipse-jkube#1929: Fixed broken tests Signed-off-by: balbusm <balbusm@gmail.com> Fix eclipse-jkube#1929: Using dot to discriminate user/registry
Signed-off-by: balbusm <balbusm@gmail.com>
Signed-off-by: balbusm <balbusm@gmail.com>
Signed-off-by: balbusm <balbusm@gmail.com>
Signed-off-by: balbusm <balbusm@gmail.com>
@balbusm : Upon revisiting this issue and trying to reproduce it locally using a local registry I wasn't able to reproduce the issue. I can see that ImageName still parses it as a user but somehow docker daemon seems to pull the image correctly. Could you please check my steps and see if you see similar behavior?
|
@balbusm : I'm going to revert my changes from your branch. |
Signed-off-by: balbusm <balbusm@gmail.com>
Signed-off-by: balbusm <balbusm@gmail.com>
Signed-off-by: balbusm <balbusm@gmail.com>
Signed-off-by: balbusm <balbusm@gmail.com>
Signed-off-by: balbusm <balbusm@gmail.com>
@balbusm : Sorry, it took quite longer than I expected for this issue. Could you please try out whether the fix is working for your pipeline on <pluginRepositories>
<pluginRepository>
<id>oss.sonatype.org</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
</pluginRepository>
</pluginRepositories> |
Describe the bug
<sever>
authentication insettings.xml
doesn't work for pullregistry.Also using docker login is not respected with pullregistry (settings.xml without server section).
I have two separate docker registries. One for pull (dockerhub proxy) and one for push.
Case 1. jkube doesn't respect
settings.xml
configurationsettings.xml
Dockerfile
I noticed that everything works as expected when I set server id to docker.io
Case 2. After logging via docker login to my.proxy I'm getting unauthorized exception.
Eclipse JKube version
1.10.0
Component
Kubernetes Maven Plugin
Apache Maven version
3.8.1
Gradle version
No response
Steps to reproduce
Dockerfile
Expected behavior
Image is being downloaded from registry.
Runtime
Kubernetes (vanilla)
Kubernetes API Server version
other (please specify in additional context)
Environment
macOS
Eclipse JKube Logs
Sample Reproducer Project
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: