| | |
| | |
|
| | | 
|
| | |
|
| | | ### Important Changes to Note
|
| | |
|
| | | The *Gitblit 0.8.0* federation protocol adds retrieval of teams and referenced push scripts. Older clients will not know to request team or push script information. |
| | |
|
| | | The *Gitblit 0.7.0* federation protocol is incompatible with the 0.6.0 federation protocol because of a change in the way timestamps are formatted.
|
| | |
|
| | | Gitblit 0.6.0 uses the default [google-gson](http://google-gson.googlecode.com) timestamp serializer which generates locally formatted timestamps. Unfortunately, this creates problems for distributed repositories and distributed developers. Gitblit 0.7.0 corrects this error by serializing dates to the [iso8601](http://en.wikipedia.org/wiki/ISO_8601) standard. As a result 0.7.0 is not compatible with 0.6.0. A partial backwards-compatibility fallback was considered but it would only work one direction and since the federation mechanism is bidirectional it was not implemented.
|
| | |
|
| | | ### Origin Gitblit Instance Requirements
|
| | |
|
| | | - *git.enableGitServlet* must be true, all Git clone and pull requests are handled through Gitblit's JGit servlet
|
| | |
| | | String repositoriesToken = SHA1(passphrase + "-REPOSITORIES");
|
| | | %ENDCODE%
|
| | |
|
| | | The *ALL* token allows another Gitblit instance to pull all your repositories, user accounts, and server settings. |
| | | The *ALL* token allows another Gitblit instance to pull all your repositories, user accounts, server settings, and referenced push scripts. |
| | | The *USERS_AND_REPOSITORIES* token allows another Gitblit instance to pull all your repositories and user accounts.
|
| | | The *REPOSITORIES* token only allows pulling of the repositories.
|
| | |
|
| | |
| | | During a federated pull operation, Gitblit does check that the *origin* of the local repository starts with the url of the federation registration.
|
| | | If they do not match, the repository is skipped and this is indicated in the log.
|
| | |
|
| | | #### User Accounts
|
| | | #### User Accounts & Teams
|
| | |
|
| | | By default all user accounts except the *admin* account are automatically pulled when using the *ALL* token or the *USERS_AND_REPOSITORIES* token. You may exclude a user account from being pulled by a federated Gitblit instance by checking *exclude from federation* in the edit user page.
|
| | | By default all user accounts and teams (except the *admin* account) are automatically pulled when using the *ALL* token or the *USERS_AND_REPOSITORIES* token. You may exclude a user account from being pulled by a federated Gitblit instance by checking *exclude from federation* in the edit user page.
|
| | |
|
| | | The pulling Gitblit instance will store a registration-specific `users.properties` file for the pulled user accounts and their repository permissions. This file is stored in the *federation.N.folder* folder.
|
| | | The pulling Gitblit instance will store a registration-specific `users.conf` file for the pulled user accounts and their repository permissions. This file is stored in the *federation.N.folder* folder.
|
| | |
|
| | | If you specify *federation.N.mergeAccounts=true*, then the user accounts from the origin Gitblit instance will be integrated into the `users.properties` file of your Gitblit instance and allow sign-on of those users.
|
| | | If you specify *federation.N.mergeAccounts=true*, then the user accounts and team definitions from the origin Gitblit instance will be integrated into the `users.conf` file of your Gitblit instance and allow sign-on of those users.
|
| | |
|
| | | **NOTE:**
|
| | | Upgrades from older Gitblit versions will not have the *#notfederated* role assigned to the *admin* account. Without that role, your admin account WILL be transferred with an *ALL* or *USERS_AND_REPOSITORIES* token.
|
| | |
| | |
|
| | | These settings are unused by the pulling Gitblit instance.
|
| | |
|
| | | #### Push Scripts |
| | |
|
| | | Your Groovy push scripts are only pulled when using the *ALL* token.
|
| | |
|
| | | The pulling Gitblit instance will retrieve any referenced (i.e. used) push script and store it locally as *registration_scriptName.groovy* in the *federation.N.folder* folder.
|
| | |
|
| | | These scripts are unused by the pulling Gitblit instance.
|
| | |
|
| | | ### Collisions and Conflict Resolution
|
| | |
|
| | | Gitblit does **not** detect conflict and it does **not** offer conflict resolution of repositories, users, or settings.
|
| | | Gitblit does **not** detect conflict and it does **not** offer conflict resolution of repositories, users, teams, or settings.
|
| | |
|
| | | If an object exists locally that has the same name as the remote object, it is assumed they are the same and the contents of the remote object are merged into the local object. If you can not guarantee that this is the case, then you should not store any federated repositories directly in *git.repositoriesFolder* and you should not enable *mergeAccounts*.
|
| | |
|
| | |
| | |
|
| | | ## Federation Pull Registration Keys
|
| | |
|
| | | <table>
|
| | | <table class="table">
|
| | | <tr><th>federation.N.url</th>
|
| | | <td>string</td>
|
| | | <td>the url of the origin Gitblit instance <em>(required)</em></td>
|
| | |
| | |
|
| | | <tr><th>federation.N.mergeAccounts</th>
|
| | | <td>boolean</td>
|
| | | <td>if <b>true</b>, merge the retrieved accounts into the <code>users.properties</code> of <b>this</b> Gitblit instance.<br/><em>default is false</em></td>
|
| | | <td>if <b>true</b>, merge the retrieved accounts into the <code>users.conf</code> of <b>this</b> Gitblit instance.<br/><em>default is false</em></td>
|
| | | </tr>
|
| | |
|
| | | <tr><th>federation.N.sendStatus</th>
|
| | |
| | |
|
| | | This assumes that the *token* is the *ALL* token from the origin gitblit instance.
|
| | |
|
| | | The repositories, example1_users.properties, and example1_gitblit.properties will be put in *git.repositoriesFolder* and the origin user accounts will be merged into the local user accounts, including passwords and all roles. The Gitblit instance will also send a status acknowledgment to the origin Gitblit instance at the end of the pull operation. The status report will include the state of each repository pull (EXCLUDED, SKIPPED, NOCHANGE, PULLED, MIRRORED). This way the origin Gitblit instance can monitor the health of its mirrors.
|
| | | The repositories, example1_users.conf, example1_gitblit.propertiesn and all example1_scripts.groovy will be put in *git.repositoriesFolder* and the origin user accounts will be merged into the local user accounts, including passwords and all roles. The Gitblit instance will also send a status acknowledgment to the origin Gitblit instance at the end of the pull operation. The status report will include the state of each repository pull (EXCLUDED, SKIPPED, NOCHANGE, PULLED, MIRRORED). This way the origin Gitblit instance can monitor the health of its mirrors.
|
| | |
|
| | | This example is considered *nearly* perfect because while the origin Gitblit's server settings are pulled and saved locally, they are not merged with your server settings so its not a true mirror, but its likely the mirror you'd want to configure.
|
| | | This example is considered *nearly* perfect because while the origin Gitblit's server settings & push scripts are pulled and saved locally, they are not merged with your server settings so its not a true mirror.
|
| | |
|
| | | federation.example1.url = https://go.gitblit.com
|
| | | federation.example1.token = 6f3b8a24bf970f17289b234284c94f43eb42f0e4
|