Gitolite SSH Config


Setting Default Notes
:gitolite_user git The :gitolite_user is the user under which Gitolite is installed.
:gitolite_server_host localhost The hostname (or IP address) of the Gitolite server. By default it is set to ‘localhost’, change it if you want to host Redmine and Gitolite on different servers.
:gitolite_server_port 22 The :gitolite_server_port variable should be set to the port which will be used to access the Gitolite repositories via SSH.
:gitolite_ssh_private_key redmine dir/plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa Path to the private key files for accessing the Gitolite admin repository.
:gitolite_ssh_public_key redmine dir/plugins/redmine_git_hosting/ssh_keys/redmine_gitolite_admin_id_rsa.pub Path to the public key files for accessing the Gitolite admin repository.

Gitolite Storage Config


Setting Default Notes
:gitolite_global_storage_dir repositories/ The :gitolite_global_storage_dir is the path relative to the Git user root where the repositories are located. This should always be non-empty and should end in a file separator, e.g. ‘/’. Since Gitolite always uses repositories/ as the default place for repositories you probably shouldn’t have to change this.
:gitolite_redmine_storage_dir '' The :gitolite_redmine_storage_dir is an optional subdirectory under the :gitolite_global_storage_dir which can be used for all plugin-managed repositories. Its default value is the empty string (no special subdirectory). If you choose to set it, make sure that the resulting path ends in a file separator, e.g. ‘/’.
:gitolite_recycle_bin_dir recycle_bin/ The :gitolite_recycle_bin_dir is the path relative to the Git user root where deleted repositories are placed. This path should end in a path separator, e.g. ‘/’.
:gitolite_local_code_dir local/ The :gitolite_local_code_dir is the path relative to the Git user root where hook files are placed. This path should end in a path separator, e.g. ‘/’.
:gitolite_lib_dir bin/lib/ The :gitolite_lib_dir is the path where Gitolite librairies are stored. The default value assumes that Gitolite was installed by hand. (/usr/share/gitolite3/lib with the Debian package)

Gitolite Config File


Setting Default Notes
:gitolite_config_file gitolite.conf The :gitolite_config_file parameter specifies the Gitolite configuration file used by Redmine for Redmine-managed repositories. This file (or path) is relative to the Gitolite conf/ directory. The default value of gitolite.conf is sufficient for most configurations. If you choose to change this parameter, you will need to place a corresponding “include” statement in gitolite.conf.
:gitolite_identifier_prefix redmine_ Prefix for Gitolite identifiers
:gitolite_identifier_strip_user_id false If set to true thee user ID will be removed from Gitolite identifiers

Gitolite Global Config


Setting Default Notes
:gitolite_temp_dir redmine dir/tmp/redmine_git_hosting The :gitolite_temp_dir parameter points at a temporary directory for locks and Gitolite administrative configurations. This path should end in a path separator, e.g. ‘/’. For a system in which multiple Redmine sites point at the same Gitolite repository (i.e. share a single Git user), it is very important that all of said sites share the same temporary directory (so that locking works properly). You should probably just leave this parameter with its default value.
:gitolite_recycle_bin_expiration_time 24.0 Deleted repositories are kept here for up to :gitolite_recycle_bin_expiration_time hours
:gitolite_log_level info Set plugin loglevel : Debug, Info, Warning, Error
:git_config_username Redmine Git Hosting Git author name for commits
:git_config_email redmine@example.net Git author email for commits

Gitolite Hooks Config


Setting Default Notes
:gitolite_overwrite_existing_hooks true Force Gitolite hooks update. This install our provided hooks (those in contrib/hooks) in Gitolite.
:gitolite_hooks_are_asynchronous false Execute Gitolite hooks in background. No output will be display on console.
:gitolite_hooks_debug false Execute Gitolite hooks in debug mode.
:gitolite_hooks_url http://localhost:3000 The Redmine url. This should point to your Redmine instance.

Gitolite Cache Config


Setting Default Notes
:gitolite_cache_max_time 86400 It is the maximum amount of time the Git command will be cached. No matter what, the output of Git commands for a given repository are cleared when new commits are pushed to the server and the post-receive hook is called.
:gitolite_cache_max_size 16 It is the maximum size in Mo of the Git output to cache. Anything above this size won’t be cached, and Git will be called directly every time this command is run.
:gitolite_cache_max_elements 2000 It is the maximum number of Git commands for which to cache the output.
:gitolite_cache_adapter database Cache system to use to store GitCache. It can be database, memcached or redis.

Important note :

If using MySQL for your database, you must make sure that the max_allowed_packet size is set (in, e.g., /etc/my.cnf) to be at least as large as the value you specify for :gitolite_cache_max_size above. If you do not do this, you are likely to get very strange failures of the web server. Such a setting must be placed in the [mysqld] parameter section of this file, for instance :

[mysqld]
datadir = /var/lib/mysql
socket  = /var/lib/mysql/mysql.sock
user = mysql
max_allowed_packet = 32M

The above example should allow :gitolite_cache_max_size == 32M.

Gitolite Access Config


Setting Default Notes
:ssh_server_domain localhost The :ssh_server_domain variable should be set to the hostname which will be used to access your Redmine site by SSH, e.g. www.my-own-personal-git-host-server.com. This variable may optionally include a port using the ‘:portnum’ syntax, i.e. www.my-own-person-git-host-server.com:2222.
:http_server_domain localhost The :http_server_domain variable should be set to the hostname which will be used to access your Redmine site by HTTP, e.g. www.my-own-personal-git-host-server.com. This variable may optionally include a port using the ‘:portnum’ syntax, i.e. www.my-own-person-git-host-server.com:8000.
:https_server_domain localhost The :https_server_domain variable should be set to the hostname which will be used to access your Redmine site by HTTPS, e.g. www.my-own-personal-git-host-server.com. This variable may optionally include a port using the ‘:portnum’ syntax, i.e. www.my-own-person-git-host-server.com:8443. Set to empty if you don’t use it.
:http_server_subdir '' The :http_server_subdir variable should be set to the subdir which will be used to access your Redmine site by HTTP.
:show_repositories_url true Repositories URLs can be hidden in the repository tab.
:gitolite_daemon_by_default true Enable Git daemon for new projects.
:gitolite_http_by_default 1 Enable Smart HTTP for new projects. (0 => disabled, 1 => HTTPS only, 2 => HTTPS and HTTP, 3 => HTTP only)

Git Mailing List Config


Setting Default Notes
:gitolite_notify_by_default false Enable Git notification hook for new repositories?
:gitolite_notify_global_prefix [REDMINE] Default global prefix for commit mail subject. Used if not set at repository level.
:gitolite_notify_global_sender_address redmine@example.com Default global sender address. Used if not set at repository level.
:gitolite_notify_global_include [] Email adresses to include in all mailing lists by default.
:gitolite_notify_global_exclude [] Email adresses to exclude in all mailing lists by default.

Redmine Config


Setting Default Notes
:redmine_has_rw_access_on_all_repos true If set to true Redmine will have RW access on all Gitolite repositories.
:all_projects_use_git false Can be enabled to automatically create a new Git repository every time you create a new project. You won’t have to create the project and then create the repository, this will be done all it one step.
:init_repositories_on_create false Can be enabled to automatically initialize a new Git repository with a README file (à la GitHub).
:delete_git_repositories true Can be enabled to let this plugin control repository deletion. By default, this feature is disabled and when a repository is deleted in Redmine, it is not deleted in Gitolite. This is a safety feature to prevent the accidental loss of data. If this feature is enabled, the safety is turned off and the repository files will be deleted when the Project/Repository is deleted in Redmine. Note, however, that even when this feature is enabled, deleted repositories are placed into a “recycle_bin” for a configurable amount of time (defaulting to 24 hours) and can be recovered by recreating the project or the repository in Redmine with the same identifier.
:hierarchical_organisation true The :hierarchical_organisation variable is a boolean value which denotes whether or not the plugin-managed repositories are placed into a hierarchy that mirrors the project hierarchy.
:gitolite_use_sidekiq false If set to true the plugin will use Sidekiq to launch asynchronous jobs.