Jump to: navigation, search

Tycho/Target Platform/Authentication and Mirrors

Similar to what is possible Maven, you can influence how Tycho accesses remote p2 repositories through configuration parameters in the Maven settings.xml.

Credentials for p2 Repositories

In order to specify user name and password for a p2 repository requiring basic authentication, add a <server> entry in the settings.xml.


When accessing a p2 repository, Tycho will check if there is a <server> entry with matching ID and use these credentials. The ID of a p2 repository can be specified explicitly, e.g. when the repository is added in the POM. If no ID is specified, e.g. in a target file, the repository URL (without trailing slash) is used as ID (since Tycho 0.16.0).

Loading p2 Repositories from Alternative Locations

In order to load a p2 repository from an alternative location, e.g. a local mirror of the repository, add a <mirror> configuration entry in the settings.xml. Example:


Like for credentials, the repository ID is either the configured ID or the URL of the repository (without trailing slash). Note that mirrorOf supports multiple elements separated by commas.

Note: Mirrors for repositories specified in target files are only supported since Tycho 0.16.0 (see bug 356016).

Mirroring multiple Repositories

If you have multiple repositories pointing to different update site on the same host and you want to load all of them from an alternative location, you do not have to specify a mirror for each of them. You could use the the common part of the URL as mirrorOf (instead of the repository id in a regular mirror definition) and all repositories starting with that URL prefix would get mirrored. The remaining part will be added to the mirrorOf URL.


If you have 2 repositories:


And you want to mirror both of them, you could specify the mirror in your settings.xml like that:


Having that mirror configured in your settings.xml, your repositories will point to the following URLs:

http://mirror.example.com/eclipse-mirror/path1/updatesite1 and


Note: For using that kind of mirrors you must use Tycho 0.27.0 or above (see: https://bugs.eclipse.org/bugs/show_bug.cgi?id=501809 Bug 501809)