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 9f7998f23276d44435bd3319099d13bcb40c6b7e

Small texts fixes
Author: Catalin(ux) M. BOIE
Author date (UTC): 2017-05-24 18:51
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2017-05-24 18:51
Parent(s): 9b77048af3f73f8bf30128d5b07a2bae28315d45
Signing key:
Tree: ecbf3f2c056aa0468c8b8b5bb878b8c743b646a4
File Lines added Lines deleted
README 1 1
inc/repo.inc.php 2 3
inc/token.inc.php 3 1
inc/user.inc.php 6 3
root/index.php 2 2
root/themes/default/admin/settings/ssh/hints.html 1 1
root/themes/default/doc/api.html 6 6
root/themes/default/main.css 2 2
root/themes/default/repo/bug/show.html 1 1
File README changed (mode: 100644) (index 351369c..6495c3c)
15 15 . Upgrades with the standard tools of the distributions . Upgrades with the standard tools of the distributions
16 16 . Very little dependencies, all packaged in main-stream distributions . Very little dependencies, all packaged in main-stream distributions
17 17 . SELinux friendly . SELinux friendly
18 . Very small (RPM is around 300KiB)
18 . Very small (RPM is around 400KiB)
19 19 . IPv6 ready . IPv6 ready
20 20 . Internationalization ready . Internationalization ready
21 21
File inc/repo.inc.php changed (mode: 100644) (index d4017e7..7b218f0)
... ... function rg_repo_list_query($db, $url, $sql, $params, $login_ui)
1254 1254 $d = array(); $d = array();
1255 1255 while (($row = rg_sql_fetch_array($res))) { while (($row = rg_sql_fetch_array($res))) {
1256 1256 $_line = array(); $_line = array();
1257
1258 1257 foreach ($row as $k => $v) foreach ($row as $k => $v)
1259 1258 $_line[$k] = $v; $_line[$k] = $v;
1260 1259
 
... ... function rg_repo_search_high_level($db, $rg, $ui, $url)
2092 2091 } }
2093 2092
2094 2093 /* /*
2095 * Discover top menu
2096 * @ui - act like login_ui
2094 * Discover top menu helper
2095 * @ui - acts like login_ui
2097 2096 */ */
2098 2097 function rg_repo_discover($db, $op, $rg, $ui) function rg_repo_discover($db, $op, $rg, $ui)
2099 2098 { {
File inc/token.inc.php changed (mode: 100644) (index 5e18f4a..5b0417d)
... ... function rg_token_get($db, $rg, $tag)
243 243 rg_log('DEBUG: generated token ' . $ret); rg_log('DEBUG: generated token ' . $ret);
244 244 $ret2 = $ret; $ret2 = $ret;
245 245
246 if ($rg['debug'])
246 if ($rg['debug']) {
247 247 $ret2 .= ':' . $tag; $ret2 .= ':' . $tag;
248 rg_log('DEBUG" debug is active');
249 }
248 250
249 251 rg_cache_set($key, $ret2, RG_SOCKET_NO_WAIT); rg_cache_set($key, $ret2, RG_SOCKET_NO_WAIT);
250 252
File inc/user.inc.php changed (mode: 100644) (index 561943a..4bab946)
... ... function rg_user_list_to_full_info($db, $list)
1864 1864 */ */
1865 1865 function rg_process_input($content_length, $content_encoding, &$err) function rg_process_input($content_length, $content_encoding, &$err)
1866 1866 { {
1867 $te = rg_var_str('HTTP_TRANSFER_ENCODING');
1867 $te = isset($_SERVER['HTTP_TRANSFER_ENCODING']) ?
1868 $_SERVER['HTTP_TRANSFER_ENCODING'] : '';
1868 1869
1869 1870 rg_log_enter('DEBUG: process_input: cl=' . $content_length rg_log_enter('DEBUG: process_input: cl=' . $content_length
1870 1871 . ' content_encoding=' . $content_encoding . ' content_encoding=' . $content_encoding
 
... ... function rg_user_http_git($db, $rg, $paras)
2118 2119 rg_log('DEBUG: it is a fetch'); rg_log('DEBUG: it is a fetch');
2119 2120 } }
2120 2121
2121 $content_length = rg_var_int('CONTENT_LENGTH');
2122 $content_encoding = rg_var_str('HTTP_CONTENT_ENCODING');
2122 $content_length = isset($_SERVER['CONTENT_LENGTH']) ?
2123 intval($_SERVER['CONTENT_LENGTH']) : 0;
2124 $content_encoding = isset($_SERVER['HTTP_CONTENT_ENCODING']) ?
2125 $_SERVER['HTTP_CONTENT_ENCODING'] : '';
2123 2126 rg_log('DEBUG: cl=' . $content_length . ' ce=' . $content_encoding); rg_log('DEBUG: cl=' . $content_length . ' ce=' . $content_encoding);
2124 2127
2125 2128 if (strcmp($file, 'info/refs') == 0) { if (strcmp($file, 'info/refs') == 0) {
File root/index.php changed (mode: 100644) (index 3bea946..d6d1b36)
... ... $_c = rg_template("index.html", $rg, TRUE /* xss */);
279 279 header('Cache-Control: private, no-cache'); header('Cache-Control: private, no-cache');
280 280
281 281 // Caching // Caching
282 $proto = rg_var_str('SERVER_PROTOCOL');
282 $proto = isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : '';
283 283 if (strcmp($proto, 'HTTP/1.1') == 0) { if (strcmp($proto, 'HTTP/1.1') == 0) {
284 284 $we_have = sha1($_c); $we_have = sha1($_c);
285 285 if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) if (isset($_SERVER['HTTP_IF_NONE_MATCH']))
 
... ... if (strcmp($proto, 'HTTP/1.1') == 0) {
295 295 echo $_c; echo $_c;
296 296 } }
297 297 } else { } else {
298 rg_log('WARN: Un-handled protocol ' . $proto);
298 rg_log('WARN: Un-handled protocol [' . $proto . ']');
299 299 echo $_c; echo $_c;
300 300 } }
301 301
File root/themes/default/admin/settings/ssh/hints.html changed (mode: 100644) (index db030f8..040d283)
... ... Match User rocketgit<br />
12 12 &nbsp;&nbsp; AuthorizedKeysCommandUser rocketgit<br /> &nbsp;&nbsp; AuthorizedKeysCommandUser rocketgit<br />
13 13 &nbsp;&nbsp; AuthenticationMethods publickey &nbsp;&nbsp; AuthenticationMethods publickey
14 14 </div> </div>
15
15 Then, restart the ssh daemon.
File root/themes/default/doc/api.html changed (mode: 100644) (index f2bd038..4558a75)
... ... $ ssh rocketgit@rocketgit.com api user_rights_list user=bla
75 75 "right_id": "79", "right_id": "79",
76 76 "ip": "", "ip": "",
77 77 "misc2": "", "misc2": "",
78 "<b>Description</b>": "dfdsfds",
78 "description": "dfdsfds",
79 79 "username": "*", "username": "*",
80 80 "who_name": "catab", "who_name": "catab",
81 81 "rights_text": "Push", "rights_text": "Push",
82 82 "itime_text": "2015-12-18 05:52", "itime_text": "2015-12-18 05:52",
83 83 "ip_nice": "Any", "ip_nice": "Any",
84 "HTML:<b>Description</b>_nlbr": "dfdsfds",
84 "HTML:description</b>_nlbr": "dfdsfds",
85 85 "can_be_deleted": 1 "can_be_deleted": 1
86 86 }, },
87 87 ... ...
 
... ... $ ssh rocketgit@rocketgit.com api user_ssh_keys_list user=bla
125 125 <b>Parameters</b>: user<br /> <b>Parameters</b>: user<br />
126 126 Example: Example:
127 127 <div class="term"> <div class="term">
128 $ curl --header 'Authorization: bla this_is_bla_api_key' \
128 $ curl --header 'Authorization: put_here_your_username this_is_your_api_key' \
129 129 --data '{"cmd": "user_wh_list", "user": "bla"}' \ --data '{"cmd": "user_wh_list", "user": "bla"}' \
130 @@base_url@@/op/api
130 @@base_url@@/op/api
131 131 $ ssh rocketgit@rocketgit.com api user_wh_list user=bla $ ssh rocketgit@rocketgit.com api user_wh_list user=bla
132 132 [ [
133 133 { {
134 134 "id": "648", "id": "648",
135 135 "uid": "846", "uid": "846",
136 136 "itime": "1454001110", "itime": "1454001110",
137 "<b>Description</b>": "Test Slack integration",
137 "description": "Test Slack integration",
138 138 "add_ip": "192.168.79.154", "add_ip": "192.168.79.154",
139 139 "last_output": "* Trying ...H5pQ==\r\n\r\nok", "last_output": "* Trying ...H5pQ==\r\n\r\nok",
140 140 "idata": { "idata": {
 
... ... $ ssh rocketgit@rocketgit.com api user_wh_list user=bla
160 160 "repo": ".*10", "repo": ".*10",
161 161 "itime_nice": "2016-01-28 17:11", "itime_nice": "2016-01-28 17:11",
162 162 "HTML:flags_text": "", "HTML:flags_text": "",
163 "HTML:<b>Description</b>_nice": "Test Slack integration",
163 "HTML:description_nice": "Test Slack integration",
164 164 "HTML:last_output_nice": "* Try...\r\nok" "HTML:last_output_nice": "* Try...\r\nok"
165 165 }, },
166 166 ... ...
File root/themes/default/main.css changed (mode: 100644) (index 7a2a7cc..e84b46e)
... ... form input[type="radio"] {
74 74 form select option { padding: 1px 4px 1px 4px; } form select option { padding: 1px 4px 1px 4px; }
75 75 form input[type="submit"] { form input[type="submit"] {
76 76 color: #f00; color: #f00;
77 font-weight: bold;
78 77 font-size: 11pt; font-size: 11pt;
79 78 padding: 2px 4px 2px 4px; padding: 2px 4px 2px 4px;
80 79 cursor: pointer; cursor: pointer;
 
... ... form fieldset { margin-top: 5pt; padding: 3pt; }
91 90 .form_inline form { margin-top: 0 } .form_inline form { margin-top: 0 }
92 91 .form_inline form input[type="submit"] { .form_inline form input[type="submit"] {
93 92 margin-top: 0; margin-top: 0;
94 padding: 0;
93 padding: 0 5px;
95 94 } }
96 95
97 96 legend { padding: 0px 2pt; } legend { padding: 0px 2pt; }
 
... ... legend { padding: 0px 2pt; }
394 393 .hints ul li { } .hints ul li { }
395 394 .hints ul li a { } .hints ul li a { }
396 395
396 .hint_warn { color: #f00 }
397 397
398 398 .bug { .bug {
399 399 display: flex; display: flex;
File root/themes/default/repo/bug/show.html changed (mode: 100644) (index 99951fc..95bcbba)
19 19 Reporter: <b>@@bug::owner@@</b><br /> Reporter: <b>@@bug::owner@@</b><br />
20 20 Assigned to: <b>@@if("@@bug::assigned_to@@" == ""){{-}}{{@@bug::assigned_to@@}}</b><br /> Assigned to: <b>@@if("@@bug::assigned_to@@" == ""){{-}}{{@@bug::assigned_to@@}}</b><br />
21 21 @@if(@@bug::deleted@@ != 0){{ @@if(@@bug::deleted@@ != 0){{
22 <font color="red">Deleted by: @@bug::deleted_who_name@@ (@@bug::deleted_text@@ UTC)</font><br />
22 <span style="color: #f00">Deleted by: @@bug::deleted_who_name@@ (@@bug::deleted_text@@ UTC)</span><br />
23 23 }} }}
24 24 </div> </div>
25 25
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