-
Notifications
You must be signed in to change notification settings - Fork 193
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
When trying to resolve a target platform from a p2 repo to be accessed over an authenticated mirror, Tycho fails to authenticate against the mirror. #2930
Comments
@kevloral can you try if it helps to have indivual items instead of
Maybe you can try to reproduce the problem with |
Just tried this and it makes no difference. The problem persists.
Will try this next. |
I have run PasswordProtectedP2RepositoryTest (branch 4.0.x) and all the tests completed successfully. |
Yes that is expsected, what we need here is to adjust the test (e.g. adding a new testcase) that replicates your local setup and shows the problem. |
Is there any update on this issue? |
@stk84 as mentioned we need to adjust to reproduce the problem so we can analyze whats going wrong, or you analyze / fix it with your live infrastructure and propose a PR. |
Actually, I have implemented a couple of tests in PasswordProtectedP2RepositoryTest to try to reproduce the problem but, surprisingly, they both pass. Therefore, I think the bug is not fully characterized by the current description. I thought it was just a matter of Tycho not sending credentials when trying to access a repository over a mirror but now I think it is more complex than that, specially because I have found a workaround: when setting the tycho.resolver.classic property to true, the problem does not occur. @stk84 could you please give that workaround a try to see if that also works for you? |
Two test cases added for trying to reproduce the bug. As things stand, they both pass, so they need improving.
I have just found out that when setting the tycho.resolver.classic property to true the problem does not occur any more because the mirror is bypassed entirely. Therefore, not a valid workaround for the problem at all. |
The attempt to access the repo over the mirror was being carried out in a spawned eclipse runtime. Therefore, I was not seeing these log messages:
I have highlighted the relevant part. Could all of this be related to this commit? |
Two more test cases added: - testTargetDefinitionMirror: this one tries to resolve a target definition from a p2 repo accessed over a mirror with no authentication. It passes. - testTargetDefinitionAuthMirror: this one tries to resolve a target definition from a p2 repo accessed over an authenticated mirror. It fails, as this is exactly the case that is being reported on the associated bug.
Two more test cases added. The second one successfully reproduces the bug:
Now I am going to edit the bug title to more properly describe it. |
Mirrors are now included in the returned list of known repo locations. Also, these test cases have been added: - testMirror: the test server is accessed over a mirror without authentication. - testAuthMirror: the test server is accessed over a mirror with authentication. - testTargetDefinitionMirror: this one tries to resolve a target definition from a p2 repo accessed over a mirror with no authentication. - testTargetDefinitionAuthMirror: this one tries to resolve a target definition from a p2 repo accessed over an authenticated mirror. This is the one that actually reproduced the bug that has been fixed here.
Mirrors are now included in the returned list of known repo locations. Also, these test cases have been added: - testMirror: the test server is accessed over a mirror without authentication. - testAuthMirror: the test server is accessed over a mirror with authentication. - testTargetDefinitionMirror: this one tries to resolve a target definition from a p2 repo accessed over a mirror with no authentication. - testTargetDefinitionAuthMirror: this one tries to resolve a target definition from a p2 repo accessed over an authenticated mirror. This is the one that actually reproduced the bug that has been fixed here.
Mirrors are now included in the returned list of known repo locations. Also, these test cases have been added: - testMirror: the test server is accessed over a mirror without authentication. - testAuthMirror: the test server is accessed over a mirror with authentication. - testTargetDefinitionMirror: this one tries to resolve a target definition from a p2 repo accessed over a mirror with no authentication. - testTargetDefinitionAuthMirror: this one tries to resolve a target definition from a p2 repo accessed over an authenticated mirror. This is the one that actually reproduced the bug that has been fixed here.
Mirrors are now included in the returned list of known repo locations. Also, these test cases have been added: - testMirror: the test server is accessed over a mirror without authentication. - testAuthMirror: the test server is accessed over a mirror with authentication. - testTargetDefinitionMirror: this one tries to resolve a target definition from a p2 repo accessed over a mirror with no authentication. - testTargetDefinitionAuthMirror: this one tries to resolve a target definition from a p2 repo accessed over an authenticated mirror. This is the one that actually reproduced the bug that has been fixed here.
Mirrors are now included in the returned list of known repo locations. Also, these test cases have been added: - testMirror: the test server is accessed over a mirror without authentication. - testAuthMirror: the test server is accessed over a mirror with authentication. - testTargetDefinitionMirror: this one tries to resolve a target definition from a p2 repo accessed over a mirror with no authentication. - testTargetDefinitionAuthMirror: this one tries to resolve a target definition from a p2 repo accessed over an authenticated mirror. This is the one that actually reproduced the bug that has been fixed here. (cherry picked from commit 1b787a7)
Mirrors are now included in the returned list of known repo locations. Also, these test cases have been added: - testMirror: the test server is accessed over a mirror without authentication. - testAuthMirror: the test server is accessed over a mirror with authentication. - testTargetDefinitionMirror: this one tries to resolve a target definition from a p2 repo accessed over a mirror with no authentication. - testTargetDefinitionAuthMirror: this one tries to resolve a target definition from a p2 repo accessed over an authenticated mirror. This is the one that actually reproduced the bug that has been fixed here. (cherry picked from commit 1b787a7)
Fixed in main and 4.0.5. |
I use Maven 3.9.1. Authentication worked fine when using Tycho 2.7.5 but began to fail with Tycho 3.0.0 and keeps failing using the latest release (4.0.3)
I have a Sonatype Nexus server that acts as a mirror for some p2 repositories. The mirror is declared like this in my Maven settings.xml file:
Credentials are also declared for that mirror in the same settings.xml file (password hidden here for obvious reasons):
Now, if I try to build using Tycho 2.7.5, it works fine. However, as soon as I change the Tycho version (and only the version), I get the following error when trying to access the eclipse_2023-06 repository over the mirror:
I have added authentication logging to the Nexus server and, when using 3.0.0+, Tycho sends no credentials at all.
¿Any ideas?
The text was updated successfully, but these errors were encountered: