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> / tests / config.php (51b6e98970ea5384f88791ca163326934316df4c) (1,670B) (mode 100644) [raw]
<?php

// Defaults
$rg_base = dirname(__FILE__);
$rg_sql = "dbname=trg connect_timeout=10";
if (!isset($rg_sql_debug))
	$rg_sql_debug = 1;
$rg_session_time = 3600;
$rg_keys_file = "afile.txt";
$rg_scripts = dirname(dirname(__FILE__));
$rg_repo_allow = '-\p{L}\p{N}._+=*&<>';
$rg_repo_min_len = 1;
$rg_repo_max_len = 100;
$rg_user_allow = '-\p{L}\p{N}._+=*&<>\':';
$rg_user_min_len = 1;
$rg_user_max_len = 50;
$rg_ssh_paras = "no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty";
$rg_admin_name = "RocketGit Admin (test)";
$rg_admin_email = "admin@site.tld";
$rg_account_allow_creation = 1;
$rg_account_email_confirm = 0;
$rg_log_dir = dirname(__FILE__);
$rg_state_dir = dirname(__FILE__);
$rg_lock_dir = dirname(__FILE__);
$rg_repos = "base";
$rg_theme_dir = $rg_base . "/themes";
$rg_theme = "util";
$rg_lang = "en";
$rg_cache_enable = FALSE;
$rg_event_socket = '';
$rg_ssh_host = 'rg.embedromix.ro';
$rg_ssh_port = 2222;
$rg_git_host = 'localhost';
$rg_git_port = 9418;

// For http testing
//$test_url = "http://rg.embedromix.ro:9000"; // apache
$test_url = "http://rg.embedromix.ro:9002"; // nginx
//$test_url = "https://rg.embedromix.ro:9003"; // nginx TLS

$rg_base_url = $test_url;

$a = @file(__DIR__ . '/env.txt');
foreach ($a as $line) {
	if (strncmp($line, '#', 1) == 0)
		continue;

	putenv($line);
}

if (!isset($test_normal))
	$test_normal = FALSE;

if ($test_normal) {
	$rg_sql = 'host=localhost user=rocketgit dbname=rocketgit connect_timeout=10';
	$rg_event_socket = '/var/lib/rocketgit/sockets/event.sock';
	$rg_no_db = TRUE;
	$rg_cache_enable = TRUE;
}

putenv('GIT_CURL_VERBOSE=1');
putenv('GIT_TRACE=1');
putenv('GIT_TRACE_PACKET=1');

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