List of commits:
Subject Hash Author Date (UTC)
Add rg_log_sid value to all push methods, to be able to identify the log from the user reports 4111a8a6ba1e100b3e01d277b2bc7968df9639b1 Catalin(ux) M. BOIE 2019-09-17 19:06:32
AUTHORS file update 69efc5c7617404728506b380a57cf8336a45c2fc Catalin(ux) M. BOIE 2019-09-17 19:03:59
Added TLS1.3 to the list of protocols for nginx c9fe2cc833c1a9636eab4baa2c388b2ea073ecbb Catalin(ux) M. BOIE 2019-09-17 19:03:23
History updates 3de26500d13dc1eafa00fa4721704c5cfe372fd7 Catalin(ux) M. BOIE 2019-09-17 19:01:08
Destroy confirmation link after use 6794a957bf695525b1a171eb6b602d228fd0f725 Catalin(ux) M. BOIE 2019-04-01 17:41:47
Show rg_log_sid into the user output to help identifying the logs f272e87bcb5fef0e34459c5025b3d4bc796dab6d Catalin(ux) M. BOIE 2018-08-29 21:40:36
SELinux updates 04b76e731f34762838434e8412e283be7360d188 Catalin(ux) M. BOIE 2018-08-29 21:36:29
Corrected wrong help for ssh 2fa 04f8223c0c8fc585d3c7882c17ba4ecb7c22d0b5 Catalin(ux) M. BOIE 2018-08-29 21:36:16
ldap changes 89e6848701e4c27d0f089393c7591302c45c57d4 Catalin(ux) M. BOIE 2018-08-29 21:35:56
Allow login token to be appended to the password 8a5b003845f54d2771beaec7b14b96b2029ee9db Catalin(ux) M. BOIE 2018-08-29 21:35:16
Cosmetic changes for the theme e8ed0db5fd9b41c5a63e1e171adb615a33817da8 Catalin(ux) M. BOIE 2018-08-29 21:32:36
samples updated b42d3dd5947ae9bcf3994854219e759d93abcafa Catalin(ux) M. BOIE 2018-08-29 21:32:03
docker updates f26097f046666d3ab5ca96e69f6fc458188a33ed Catalin(ux) M. BOIE 2018-08-29 21:31:16
Cosmetic changes d5069178bed9736db02c3233e95564ad7b429e17 Catalin(ux) M. BOIE 2018-08-29 21:30:42
tests: added helper for totp enrollment bad21ca093b427b200b3fbdcf2a2e1dd1820f93a Catalin(ux) M. BOIE 2018-08-29 20:59:17
Store the timestamp of the deletion for a repo, not 1 e761b36efaa37fc3c453e8382127e340bc736bc7 Catalin(ux) M. BOIE 2018-06-04 18:00:35
totp: urlencode must be used when building the url for 2fa f85ea05bf4b456cc0430e78f2705347dc79343ae Catalin(ux) M. BOIE 2018-05-29 17:39:06
totp: remove expired entries 06cd360eff667740bcf8a580447cb86f3c2e6850 Catalin(ux) M. BOIE 2018-05-29 17:38:16
Show disk size in users list 9cc05cb0307cf31d6d2ebacda0846b0774e704d7 Catalin(ux) M. BOIE 2017-12-25 08:09:22
Added timeout for ldap bind/search operations 502fbf1287f1ad37f7c6c82c473c9b472d3fa65a Catalin(ux) M. BOIE 2017-11-26 15:46:51
Commit 4111a8a6ba1e100b3e01d277b2bc7968df9639b1 - Add rg_log_sid value to all push methods, to be able to identify the log from the user reports
Author: Catalin(ux) M. BOIE
Author date (UTC): 2019-09-17 19:06
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2019-09-17 19:06
Parent(s): 69efc5c7617404728506b380a57cf8336a45c2fc
Signer:
Signing key:
Signing status: N
Tree: f1b571b39e2f871c26eb475071f06f77a3ea7487
File Lines added Lines deleted
hooks/pre-receive 2 1
inc/user.inc.php 7 4
scripts/remote.php 5 5
File hooks/pre-receive changed (mode: 100755) (index fba7673..8f128b1)
... ... umask(0077);
40 40 if ($show_info) { if ($show_info) {
41 41 rg_git_info('', '== Welcome to RocketGit! =='); rg_git_info('', '== Welcome to RocketGit! ==');
42 42 rg_git_info('', 'you are connecting from IP ' . $ip . '.'); rg_git_info('', 'you are connecting from IP ' . $ip . '.');
43 rg_git_info('', 'debug id ' . $rg_log_sid . '.');
43 rg_git_info('', 'date/time: ' . gmdate('Y-m-d H:i:s')
44 . ', debug id ' . $rg_log_sid . '.');
44 45 } }
45 46
46 47 // If user does not correct to the correct URL, correct them // If user does not correct to the correct URL, correct them
File inc/user.inc.php changed (mode: 100644) (index ca0aaa6..bb4f4ac)
... ... function rg_user_http_git($db, $rg, $paras)
2406 2406 . ' realm="Use user \'guest\' if you have no account"'); . ' realm="Use user \'guest\' if you have no account"');
2407 2407 echo 'RocketGit: Info: == Welcome to RocketGit! ==' . "\n"; echo 'RocketGit: Info: == Welcome to RocketGit! ==' . "\n";
2408 2408 echo 'RocketGit: Info: you are connecting from IP ' . $rg['ip'] . '.' . "\n"; echo 'RocketGit: Info: you are connecting from IP ' . $rg['ip'] . '.' . "\n";
2409 echo 'RocketGit: Info: debug id ' . $rg_log_sid . '.' . "\n";
2409 echo 'RocketGit: Info: date/time: ' . gmdate('Y-m-d H:i:s')
2410 . ', debug id ' . $rg_log_sid . '.' . "\n";
2410 2411 echo 'RocketGit: Info: Use user \'guest\' with any' echo 'RocketGit: Info: Use user \'guest\' with any'
2411 2412 . ' password if you want to push anonymously.' . "\n"; . ' password if you want to push anonymously.' . "\n";
2412 2413 echo 'RocketGit: Info: Append the login token or the' echo 'RocketGit: Info: Append the login token or the'
 
... ... function rg_user_http_git($db, $rg, $paras)
2419 2420 intval($_SERVER['CONTENT_LENGTH']) : 0; intval($_SERVER['CONTENT_LENGTH']) : 0;
2420 2421 $content_encoding = isset($_SERVER['HTTP_CONTENT_ENCODING']) ? $content_encoding = isset($_SERVER['HTTP_CONTENT_ENCODING']) ?
2421 2422 $_SERVER['HTTP_CONTENT_ENCODING'] : ''; $_SERVER['HTTP_CONTENT_ENCODING'] : '';
2422 rg_log('DEBUG: cl=' . $content_length . ' ce=' . $content_encoding);
2423 rg_log('DEBUG: cl=' . $content_length . ' ce=' . $content_encoding . '.');
2423 2424
2424 2425 if (strcmp($file, 'info/refs') == 0) { if (strcmp($file, 'info/refs') == 0) {
2425 2426 rg_log('DEBUG: info/refs'); rg_log('DEBUG: info/refs');
 
... ... function rg_user_http_git($db, $rg, $paras)
2451 2452 rg_git_info_pack("\x02", '== Welcome to RocketGit! =='); rg_git_info_pack("\x02", '== Welcome to RocketGit! ==');
2452 2453 rg_git_info_pack("\x02", 'you are connecting from IP ' rg_git_info_pack("\x02", 'you are connecting from IP '
2453 2454 . $rg['ip'] . '.'); . $rg['ip'] . '.');
2454 rg_git_info_pack("\x02", 'debug id ' . $rg_log_sid . '.');
2455 rg_git_info_pack("\x02", 'date/time: ' . gmdate('Y-m-d H:i:s')
2456 . ', debug id ' . $rg_log_sid . '.');
2455 2457 // If user does not connect to the correct URL, correct them // If user does not connect to the correct URL, correct them
2456 2458 if (!empty($host) && (strcasecmp($host, $rg['hostname']) != 0)) if (!empty($host) && (strcasecmp($host, $rg['hostname']) != 0))
2457 2459 rg_git_info_pack("\x02", 'Please use ' . $rg['hostname'] rg_git_info_pack("\x02", 'Please use ' . $rg['hostname']
 
... ... function rg_user_http_git($db, $rg, $paras)
2479 2481 rg_git_info_pack("\x02", '== Welcome to RocketGit! =='); rg_git_info_pack("\x02", '== Welcome to RocketGit! ==');
2480 2482 rg_git_info_pack("\x02", 'you are connecting from IP ' rg_git_info_pack("\x02", 'you are connecting from IP '
2481 2483 . $rg['ip'] . '.'); . $rg['ip'] . '.');
2482 rg_git_info_pack("\x02", 'debug id ' . $rg_log_sid . '.');
2484 rg_git_info_pack("\x02", 'date/time: ' . gmdate('Y-m-d H:i:s')
2485 . ', debug id ' . $rg_log_sid . '.');
2483 2486 // If user does not connect to the correct URL, correct them // If user does not connect to the correct URL, correct them
2484 2487 if (!empty($host) && (strcasecmp($host, $rg['hostname']) != 0)) if (!empty($host) && (strcasecmp($host, $rg['hostname']) != 0))
2485 2488 rg_git_info_pack("\x02", 'Please use ' . $rg['hostname'] rg_git_info_pack("\x02", 'Please use ' . $rg['hostname']
File scripts/remote.php changed (mode: 100644) (index 94c82cc..efda942)
... ... function fatal($str)
61 61
62 62
63 63 rg_log("Start ($rocketgit_version)..."); rg_log("Start ($rocketgit_version)...");
64 rg_log("_SERVER: " . rg_array2string($_SERVER));
65 64 // DEBUG SELinux // DEBUG SELinux
66 65 $label = @file_get_contents("/proc/self/attr/current"); $label = @file_get_contents("/proc/self/attr/current");
67 66 rg_log("SELINUX: " . $label); rg_log("SELINUX: " . $label);
 
... ... if (isset($_SERVER['SSH_CONNECTION'])) {
119 118
120 119 info('== Welcome to RocketGit! =='); info('== Welcome to RocketGit! ==');
121 120 info('you are connecting from IP ' . $ip . '.'); info('you are connecting from IP ' . $ip . '.');
122 info('debug id ' . $rg_log_sid . '.');
121 info('date/time: ' . gmdate('Y-m-d H:i:s')
122 . ', debug id ' . $rg_log_sid . '.');
123 123
124 124 if (strstr($flags, 'N')) { if (strstr($flags, 'N')) {
125 125 $login_ui = rg_user_info($db, $login_uid, '', ''); $login_ui = rg_user_info($db, $login_uid, '', '');
 
... ... if (isset($_SERVER['SSH_CONNECTION'])) {
171 171 fatal("Too less data ($line_len/$len) received!"); fatal("Too less data ($line_len/$len) received!");
172 172
173 173 // parse something like: 002bgit-upload-pack /aa.git[0x00]host=localhost:9418[0x00] // parse something like: 002bgit-upload-pack /aa.git[0x00]host=localhost:9418[0x00]
174 $line = substr($line, 4);
174 $line = substr($line, 4); // skip length
175 175 $v = explode("\0", $line); $v = explode("\0", $line);
176 176 $cmd_repo = trim($v[0]); $cmd_repo = trim($v[0]);
177 177 $host_port = isset($v[1]) ? trim(substr($v[1], 5)) : ''; $host_port = isset($v[1]) ? trim(substr($v[1], 5)) : '';
 
... ... if (strncasecmp($cmd_repo, 'git-upload-pack', 15) == 0) {
190 190 } }
191 191
192 192 // extract repository name // extract repository name
193 $_t = substr($cmd_repo, strlen($cmd));
193 $_t = substr($cmd_repo, strlen($cmd)); // skip cmd
194 194 $_t = trim($_t, "' "); $_t = trim($_t, "' ");
195 195 $_t = ltrim($_t, "/"); $_t = ltrim($_t, "/");
196 196 $_t = preg_replace('/\.git$/' , '', $_t); $_t = preg_replace('/\.git$/' , '', $_t);
 
... ... if (strcmp($_t[0], "user") == 0) {
208 208 rg_log("host=[$host] cmd=[$cmd] prefix=[$prefix] user=[$user] repo=[$repo]."); rg_log("host=[$host] cmd=[$cmd] prefix=[$prefix] user=[$user] repo=[$repo].");
209 209
210 210 if (strstr($flags, 'W')) { if (strstr($flags, 'W')) {
211 // We are a worker, the command may be only for clonning!
211 // We are a worker, the command may be only for cloning!
212 212 if (strcmp($cmd, 'git-upload-pack') != 0) if (strcmp($cmd, 'git-upload-pack') != 0)
213 213 fatal('A worker can only clone!'); fatal('A worker can only clone!');
214 214 } }
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://rocketgit.com/user/catalinux/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/catalinux/rocketgit

Clone this repository using git:
git clone git://git.rocketgit.com/user/catalinux/rocketgit

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