Community
Participate
Working Groups
on master, trying to connect to a 2.4.1 Gerrit repo Steps: 1. Go to Task repos view 2. Create a new Gerrit repo 3. Enter valid url and label 4. Check the Anonymous box 5. Validate and Finish 6. Try to create a query for all open changes => IS: "Problem updating repository: Gerrit connection issue: Failed to obtain Gerrit configuration", nothing in the Error Log => SHOULD BE: able to query open changes as anonymous
This happens because GerritClient tries to parse response after calling GET on "/", expecting to get a configuration there. The actual response: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Gerrit Code Review</title> <script type="text/javascript" language="javascript"> var href = window.location.href; var p = href.indexOf('#'); var token; if (p >= 0) { token = href.substring(p + 1); if (token.length != 0 && token.charAt(0) == '/') { token = token.substring(1); } href = href.substring(0, p); } else { token = ''; } window.location.replace(href + 'login/' + token); </script> </head> <body> <p>Redirecting to <a href="login/">Gerrit Code Review</a>.</p> </body> </html>
https://git.eclipse.org/r/#/c/14328/
See also bug 412496, for an exception thrown when adding a comment as anonymous user.
Combined with https://git.eclipse.org/r/#/c/14294/ and abandoned https://git.eclipse.org/r/#/c/14328/.
Ok, I have a candidate solution here https://git.eclipse.org/r/#/c/14294, but Steffen believes it is too extensive for inclusion in 2.0.1. I'm going to turn this back over to triage now.
This looks like the repository doesn't support anonymous access if it redirects to the login page. I don't see how it makes sense to support a case where we can't obtain the configuration that to me indicates that the repository is not accessible (for whichever reason). I'll mark this as worksforme since I can't reproduce the problem with the latest. Tomek, please reopen if you have respository URL to reproduce the problem and we can investigate further.