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.
Commit d35b5b12103f9a72a3e8788e7c48532b9c1e5b89

Show also by which protocol a user is connecting
Author: Catalin(ux) M. BOIE
Author date (UTC): 2020-08-23 15:01
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2020-08-23 15:01
Parent(s): 0d1e7915545de251eea7f3bce468647fc2df1bf9
Signing key:
Tree: 04cbec137b34a17137359e2c44c1ab99f98fe77b
File Lines added Lines deleted
inc/events.inc.php 1 0
inc/user.inc.php 4 3
scripts/remote.php 1 1
File inc/events.inc.php changed (mode: 100644) (index 3546fe5..5ec6b50)
2 2 // //
3 3 // This functions are used for background tasks: the tasks that the user should // This functions are used for background tasks: the tasks that the user should
4 4 // not wait to happen in the browser: e-mails, keyring regeneration etc. // not wait to happen in the browser: e-mails, keyring regeneration etc.
5 // prio - lower = more important
5 6 // //
6 7 require_once($INC . "/util.inc.php"); require_once($INC . "/util.inc.php");
7 8 require_once($INC . "/log.inc.php"); require_once($INC . "/log.inc.php");
File inc/user.inc.php changed (mode: 100644) (index 86935c4..9f33f58)
... ... function rg_user_http_git($db, $rg, $paras)
2480 2480 header('WWW-Authenticate: Basic' header('WWW-Authenticate: Basic'
2481 2481 . ' realm="Use user \'guest\' if you have no account"'); . ' realm="Use user \'guest\' if you have no account"');
2482 2482 echo 'RocketGit: Info: == Welcome to RocketGit! ==' . "\n"; echo 'RocketGit: Info: == Welcome to RocketGit! ==' . "\n";
2483 echo 'RocketGit: Info: you are connecting from IP ' . $rg['ip'] . '.' . "\n";
2483 echo 'RocketGit: Info: you are connecting from IP '
2484 . $rg['ip'] . ' by http(s).' . "\n";
2484 2485 echo 'RocketGit: Info: date/time: ' . gmdate('Y-m-d H:i:s') echo 'RocketGit: Info: date/time: ' . gmdate('Y-m-d H:i:s')
2485 2486 . ' (UTC), debug id ' . $rg_log_sid . '.' . "\n"; . ' (UTC), debug id ' . $rg_log_sid . '.' . "\n";
2486 2487 echo 'RocketGit: Info: Use user \'guest\' with any' echo 'RocketGit: Info: Use user \'guest\' with any'
 
... ... function rg_user_http_git($db, $rg, $paras)
2557 2558 /* /*
2558 2559 rg_git_info_pack("\x02", '== Welcome to RocketGit! =='); rg_git_info_pack("\x02", '== Welcome to RocketGit! ==');
2559 2560 rg_git_info_pack("\x02", 'you are connecting from IP ' rg_git_info_pack("\x02", 'you are connecting from IP '
2560 . $rg['ip'] . '.');
2561 . $rg['ip'] . ' by http(s).');
2561 2562 rg_git_info_pack("\x02", 'date/time: ' . gmdate('Y-m-d H:i:s') rg_git_info_pack("\x02", 'date/time: ' . gmdate('Y-m-d H:i:s')
2562 2563 . ' (UTC), debug id ' . $rg_log_sid . '.'); . ' (UTC), debug id ' . $rg_log_sid . '.');
2563 2564 // If user does not connect to the correct URL, correct them // If user does not connect to the correct URL, correct them
 
... ... function rg_user_http_git($db, $rg, $paras)
2590 2591
2591 2592 rg_git_info_pack("\x02", '== Welcome to RocketGit! =='); rg_git_info_pack("\x02", '== Welcome to RocketGit! ==');
2592 2593 rg_git_info_pack("\x02", 'you are connecting from IP ' rg_git_info_pack("\x02", 'you are connecting from IP '
2593 . $rg['ip'] . '.');
2594 . $rg['ip'] . ' by http(s).');
2594 2595 rg_git_info_pack("\x02", 'date/time: ' . gmdate('Y-m-d H:i:s') rg_git_info_pack("\x02", 'date/time: ' . gmdate('Y-m-d H:i:s')
2595 2596 . ' (UTC), debug id ' . $rg_log_sid . '.'); . ' (UTC), debug id ' . $rg_log_sid . '.');
2596 2597 // If user does not connect to the correct URL, correct them // If user does not connect to the correct URL, correct them
File scripts/remote.php changed (mode: 100644) (index ea84650..46d7156)
... ... if (isset($_SERVER['SSH_CONNECTION'])) {
130 130 rg_stats_conns_set('ip', $rg['ip']); rg_stats_conns_set('ip', $rg['ip']);
131 131
132 132 info('== Welcome to RocketGit! =='); info('== Welcome to RocketGit! ==');
133 info('you are connecting from IP ' . $rg['ip'] . '.');
133 info('you are connecting from IP ' . $rg['ip'] . ' by ssh.');
134 134 info('date/time: ' . gmdate('Y-m-d H:i:s') info('date/time: ' . gmdate('Y-m-d H:i:s')
135 135 . ', debug id ' . $rg_log_sid . '.'); . ', debug id ' . $rg_log_sid . '.');
136 136
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