AFAIK, there is no good solution. In Tycho, we are hacking credentials into the registry on access of a repository. We use a special IProvisioningAgent instance for this with own I*RepositoryManager instances to do this transparently.
For details, start at the class RemoteAgent in the Tycho sources<http://wiki.eclipse.org/Developing_Tycho>. Regards Tobias From: [email protected] [mailto:[email protected]] On Behalf Of Peter Nehrer Sent: Freitag, 1. Februar 2013 16:48 To: [email protected] Subject: Re: [p2-dev] Authority component in a p2 repository URI Hi Ian, I had a similar requirement and what I ended up doing was modifying DirectorApplication to supply credentials via UIServices. E.g., private class AvoidTrustPromptService extends UIServices { @Override public AuthenticationInfo getUsernamePassword(String location) { return authenticationMap.get(location); } ... I populate the authenticationMap through custom command-line arguments or a properties file; e.g.: ... authenticationMap.put(location, new UIServices.AuthenticationInfo(username, password, false)); ... Where location is your repository URL's hostname. I couldn't find any other reasonable way for doing this in DirectorApplication. Frankly I was surprised that this wasn't a more common use-case for it -- I would think that authenticated repositories would be more commonly used in automation scenarios. --Peter On 1/31/13 2:02 PM, Ian Bull wrote: I'm trying to access a p2 repository using the following syntax: http://irbull:password@localhost/repository And it's failing a parse exception: java.lang.NumberFormatException: For input string: "password@localhost" >From the stack, it appears that ECF is trying to use 'irbull' as the host and >password@localhost as the port. In HttpClientFileSystemBrowse, the URI is >converted to a String, and the string is parsed into components (host, port, >etc..). Does anybody know if this is supported? If not, is there a URI syntax >that we use for specifying usernames and passwords in p2? Cheers, Ian -- R. Ian Bull | EclipseSource Victoria | +1 250 477 7484 http://eclipsesource.com | http://twitter.com/eclipsesource _______________________________________________ p2-dev mailing list [email protected]<mailto:[email protected]> https://dev.eclipse.org/mailman/listinfo/p2-dev
_______________________________________________ p2-dev mailing list [email protected] https://dev.eclipse.org/mailman/listinfo/p2-dev
