|
| 1 | += git-bundle-server(1) |
| 2 | +:doctype: manpage |
| 3 | +:manmanual: Git Bundle Server Manual |
| 4 | +:mansource: Git Bundle Server |
| 5 | + |
| 6 | +== NAME |
| 7 | + |
| 8 | +git-bundle-server - create, manage, and host Git bundle content |
| 9 | + |
| 10 | +== SYNOPSIS |
| 11 | +[verse] |
| 12 | +*git-bundle-server* _command_ [_options_] |
| 13 | + |
| 14 | +== DESCRIPTION |
| 15 | + |
| 16 | +The *git-bundle-server* command-line interface configures, generates, and hosts |
| 17 | +Git bundles for use with Git's bundle URI feature (see man:git-bundle[1], |
| 18 | +man:git-fetch[1]). |
| 19 | + |
| 20 | +A bundle server is comprised of four main components: |
| 21 | + |
| 22 | +1. the repositories for which bundles are generated |
| 23 | +2. the base & incremental bundles for each repository |
| 24 | +3. the per-repository lists of those bundles |
| 25 | +4. the web server hosting the bundle and bundle-list content |
| 26 | + |
| 27 | +Repositories are initialized in the bundle server with the *init* command, which |
| 28 | +clones a specified repository and creates an initial bundle for it. |
| 29 | +Initialization also adds the repository to a list of repositories that are |
| 30 | +updated by the *update-all* command on a daily man:cron[8] schedule. |
| 31 | + |
| 32 | +New incremental bundles are created when the repository is updated, either |
| 33 | +manually (with an invocation of *update* or *update-all*) or automatically (via |
| 34 | +the man:cron[8] job). The maximum number of bundles per repository is 5; rather |
| 35 | +than creating a sixth bundle, the next update will collapse all bundles into a |
| 36 | +new base bundle. |
| 37 | + |
| 38 | +Bundle generation for a repository can be stopped with the *stop* command; if a |
| 39 | +user wishes to delete all on-disk resources for a repository, *delete* will |
| 40 | +remove all existing bundles and internal repository clone as well. |
| 41 | + |
| 42 | +The bundles generated by this server make use of the 'creationToken' heuristic |
| 43 | +to help Git clients avoid downloading bundles they already have. |
| 44 | + |
| 45 | +To serve the generated bundles, the *web-server* command can be used to start or |
| 46 | +stop a configured web server. The server will run in the domain of the user that |
| 47 | +invoked the command, and will continue running after the user logs out. The |
| 48 | +server does not automatically start on system boot (even if it was running |
| 49 | +before prior shutdown), so *web-server start* will need to be invoked to restart |
| 50 | +the server. |
| 51 | + |
| 52 | +== COMMANDS |
| 53 | + |
| 54 | +*init* _url_ _route_:: |
| 55 | + Initialize a repository for which bundles should be served. The repository is |
| 56 | + cloned into a bare repo from _url_. A base bundle is created for the |
| 57 | + repository, served from _route_, and the man:cron[8] global bundle update |
| 58 | + schedule is started. |
| 59 | + |
| 60 | +*start* _route_:: |
| 61 | + Start computing bundles for the repository identified by _route_. If the |
| 62 | + man:cron[8] scheduler responsible for periodic bundle updates has not been |
| 63 | + configured, this command starts running a global update schedule as well. |
| 64 | + |
| 65 | +*stop* _route_:: |
| 66 | + Stop computing bundles for the repository identified by _route_. |
| 67 | + |
| 68 | +*update* _route_:: |
| 69 | + For the repository specified by _route_, fetch the latest content from the |
| 70 | + remote and create a new set of bundles and update the bundle list. |
| 71 | + |
| 72 | +*update-all*:: |
| 73 | + Update all initialized repositories with *git-bundle-server update*. This |
| 74 | + command is called via the man:cron[8] scheduler. |
| 75 | + |
| 76 | +*delete* _route_:: |
| 77 | + Remove a repository configuration and delete its data on disk. |
| 78 | + |
| 79 | +*web-server* *start* [*-f*|*--force*] [_server-options_]:: |
| 80 | + Start a background process web server hosting bundle metadata and content. The |
| 81 | + web server daemon runs under the calling user's domain, and will continue |
| 82 | + running after the user logs out. |
| 83 | ++ |
| 84 | +By default, this command does not restart a running web server process or |
| 85 | +overwrite an existing web server configuration. To force that behavior, use the |
| 86 | +*--force* option. |
| 87 | ++ |
| 88 | +Additionally, users may provide options that configure the execution of |
| 89 | +the man:git-bundle-web-server[1] background process. |
| 90 | ++ |
| 91 | +-- |
| 92 | + *-f*::: |
| 93 | + *--force*::: |
| 94 | + If the web server daemon has already been configured, stop the running |
| 95 | + process if needed and rewrite the configuration before starting the service. |
| 96 | + Users should specify this option if they intend to change the web server |
| 97 | + configuration (e.g., the port number). |
| 98 | +-- |
| 99 | ++ |
| 100 | +*** |
| 101 | +Server options: |
| 102 | ++ |
| 103 | +-- |
| 104 | +include::server-options.asc[] |
| 105 | +-- |
| 106 | ++ |
| 107 | +*** |
| 108 | + |
| 109 | +*web-server* *stop* [*--remove*]:: |
| 110 | + Stop the web server background process associated with the current user, if |
| 111 | + one is running. Unless the *--remove* option is specified, the service |
| 112 | + configuration is left on disk and remains loaded into the system daemon |
| 113 | + controller. |
| 114 | + |
| 115 | + *--remove*::: |
| 116 | + In addition to stopping a running web server process, fully unload the |
| 117 | + service configuration and remove any associated daemon config files from |
| 118 | + disk. |
| 119 | + |
| 120 | +== EXAMPLE |
| 121 | + |
| 122 | +Initialize and start generating bundles for the remote repository |
| 123 | +url:https://github.com/rust-lang/rust.git[]: |
| 124 | + |
| 125 | +[source,console] |
| 126 | +---- |
| 127 | +$ git-bundle-server init https://github.com/rust-lang/rust.git rust-lang/rust |
| 128 | +---- |
| 129 | + |
| 130 | +Generate an incremental bundle with latest updates to rust-lang/rust: |
| 131 | + |
| 132 | +[source,console] |
| 133 | +---- |
| 134 | +$ git-bundle-server update rust-lang/rust |
| 135 | +---- |
| 136 | + |
| 137 | +Start an HTTPS web server on port 443 with certificate 'server.crt' and private |
| 138 | +key 'server.key': |
| 139 | + |
| 140 | +[source,console] |
| 141 | +---- |
| 142 | +$ git-bundle-server web-server start --force --port 443 --cert server.crt --key server.key |
| 143 | +---- |
| 144 | + |
| 145 | +== SEE ALSO |
| 146 | + |
| 147 | +man:git-bundle-web-server[1], man:git-bundle[1], man:git-fetch[1] |
0 commit comments