xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
<root> / samples / config.php (6dae9c24c1010dbda83fcd45131596a3c3052473) (2,030B) (mode 100644) [raw]
<?php
// RocketGit configuration file

// Base
$rg_base = "/home/rocketgit";

// Database
$rg_sql = "host=localhost user=rocketgit dbname=rocketgit"
	. " connect_timeout=10";
$rg_sql_debug = 1;

// Session
$rg_session_time = 3600;

// Keys
$rg_keys_file = $rg_base . "/.ssh/authorized_keys";

// Scripts
$rg_scripts = "/usr/share/rocketgit";

// Allowed repo names (regular expression)
$rg_repo_allow = '\pL\pN\pP';

// Allowed repo name length
$rg_repo_min_len = 2;
$rg_repo_max_len = 64;

// Allowed user names (negated regular expression)
$rg_user_allow = '\pL\pN\pP';

// Allowed user name length
$rg_user_min_len = 3;
$rg_user_max_len = 32;

// SSH parameters for authorized_keys
$rg_ssh_paras = "no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty";

// From what address we will send mails (forgot pass etc.)?
$rg_admin_name = "RocketGit Admin";
$rg_admin_email = "op@rocketgit.com";

// Set to 1 to allow any visitor to create an account.
// Else, only the admin can create accounts.
$rg_account_allow_creation = 1;

// Set to 0 if you do not want mandatory e-mail confirmation before usage.
$rg_account_email_confirm = 1;

// Maximum number of keys per user
$rg_max_ssh_keys = 10;

// log dirs
$rg_log_dir = "/var/log/rocketgit";
$rg_web_log_dir = "/var/log/rocketgit-web";

// state dir
$rg_state_dir = "/var/lib/rocketgit";

// lock dir
$rg_lock_dir = $rg_state_dir . "/locks";

// Repositories dir
$rg_repos = $rg_state_dir . "/repos";

// Directory for themes
$rg_theme_dir = $rg_scripts . "/root/themes";

// Default theme
$rg_theme = "default";

// Default language
$rg_lang = "en";

// SSH host - leave empty to autodetect
$rg_ssh_host = "";
// SSH port - put 0 to disable
$rg_ssh_port = 22;

// git host - leave empty to autodetect
$rg_git_host = "";
// Git port - put 0 to disable (standard is 9418)
$rg_git_port = 9418;

// Allow events to be registered, even if user press "stop"
ignore_user_abort(TRUE);

// How many days to keep the log files? Put 0 to not delete it.
$rg_logs_lifetime = 31;

?>
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master