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 (0ee90b233a8e83118a795aba1825c6f4a7b900b9) (2,153B) (mode 100644) [raw]
<?php
// RocketGit configuration file

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

// Database
$rg_sql_debug = 0;
$rg_sql = 'user=rocketgit dbname=rocketgit connect_timeout=10';

// 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)
// M = Mark, L = Letter, N = Number
$rg_repo_allow = '-\p{L}\p{N}._+=*&';

// Allowed repo name length (chars, not bytes)
$rg_repo_min_len = 1;
$rg_repo_max_len = 64;

// Allowed user names (regular expression)
// Do not allow ':' - else HTTP Basic auth will not work!
$rg_user_allow = '-\p{L}\p{N}._+=*&';

// Allowed user name length (chars, not bytes)
$rg_user_min_len = 1;
$rg_user_max_len = 64;

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

// From what name and address we will send mails (forgot pass etc.)?
// If e-mail is empty, it will be root@<local host name>
$rg_admin_name = "RocketGit Admin";
$rg_admin_email = '';

// 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;

// log dir
$rg_log_dir = "/var/log/rocketgit";

// 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;

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

// Addr/port to bind/listen for build workers.
// Set port to 0 to disable the builder.
$rg_builder_bind = '0.0.0.0';
$rg_builder_port = 65000;

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