improved README
|
1 |
# GitPrep |
2 | ||
Update README.md
|
3 |
Github clone. You can install portable github system into Unix/Linux. |
improved README
|
4 | |
added image
|
5 |
<img src="http://cdn-ak.f.st-hatena.com/images/fotolife/p/perlcodesample/20130421/20130421180903_original.png" width="850"> |
6 | ||
improved README
|
7 |
# Features |
8 | ||
improve readme
|
9 |
* Github clone. GitPrep have same interface as GitHub. |
10 |
* Portable. You can install GitPrep into your Unix/Linux server. |
|
improve readme
|
11 |
* Support cygwin on Windows(need gcc4 package). You can install GitPrep into Windows. |
improve readme
|
12 |
* Only needs Perl 5.8.7+. |
improve readme
|
13 |
* Smart HTTP support, you can pull and push via HTTP |
14 |
* CGI support, and having built-in web server, Reverse proxy support. |
|
improve readme
|
15 |
* SSL support. |
improved README
|
16 | |
improved install process
|
17 |
# Installation into Shared Server |
fixed git_bin not found bug
|
18 | |
improved install process
|
19 |
Shared Server must support **Linux/Unix**, **Apache**, **SuExec**, |
20 |
**CGI**, and **PHP5(CGI mode)**. |
|
fixed git_bin not found bug
|
21 | |
update readme
|
22 |
(*PHP* is not necessary, if PHP exists, the install process is easy |
Update README.md
|
23 |
because you do not need to think about permissions.) |
fixed git_bin not found bug
|
24 | |
Update README.md
|
25 |
Many shared servers support these, |
26 |
so you will be able to find a suitable server easily. |
|
fixed git_bin not found bug
|
27 | |
28 |
## Download |
|
29 | ||
Update README.md
|
30 |
First you need to download gitprep. |
fixed git_bin not found bug
|
31 | |
fixed database file permissi...
|
32 |
https://github.com/yuki-kimoto/gitprep/archive/latest.zip |
fixed git_bin not found bug
|
33 | |
Update README.md
|
34 |
Expand the zip file. You will see the following directory. |
fixed git_bin not found bug
|
35 | |
fixed database file permissi...
|
36 |
gitprep-latest |
fixed git_bin not found bug
|
37 | |
Update README.md
|
38 |
Rename the gitprep-latest directory to gitprep. |
fixed git_bin not found bug
|
39 | |
fixed database file permissi...
|
40 |
gitprep-latest -> gitprep |
fixed git_bin not found bug
|
41 | |
improved install process
|
42 |
## Configuration |
fixed git_bin not found bug
|
43 | |
Update README.md
|
44 |
GitPrep needs the git command. You must install git by yourself. |
Improve document
|
45 |
If you don't yet set user.name and user.email, you must set them. |
46 | ||
47 |
git config --global user.name "gitprep" |
|
48 |
git config --global user.email "gitprep@example.com" |
|
fixed git_bin not found bug
|
49 | |
Update README.md
|
50 |
You must add the correct git command path to the **gitprep.conf** config file. |
fixed git_bin not found bug
|
51 | |
52 |
[basic] |
|
53 |
;;; Git command path |
|
fix mini bug
|
54 |
git_bin=/home/yourname/local/bin/git |
fixed git_bin not found bug
|
55 | |
56 |
## Upload Server by FTP |
|
57 | ||
58 |
You upload these directory into server document root by FTP. |
|
59 | ||
60 |
## Setup |
|
61 | ||
62 |
Access the following URL by browser. |
|
63 | ||
fixed readme
|
64 |
http://(Your host name)/gitprep/setup/setup.php |
fixed git_bin not found bug
|
65 | |
improved install process
|
66 |
(If you don't access PHP file or don't have PHP, |
67 |
you can use CGI script |
|
68 |
please set this CGI script permission to 755) |
|
69 | ||
70 |
http://(Your host name)/gitprep/setup/setup.cgi. |
|
71 | ||
Fix typos in README
|
72 |
Click Setup button once and wait about 5 minutes. |
fixed git_bin not found bug
|
73 | |
74 |
## Go to application |
|
75 | ||
76 |
If you see result, click "Go to Application". |
|
77 | ||
some more details on how to ...
|
78 |
## Getting started |
79 | ||
80 |
On a fresh install, you will be asked to create the admin user. |
|
81 | ||
82 |
Log in as the admin user, then create a new regular user. |
|
83 | ||
84 |
Logout and log in as the regular user. Create repos and use the system! |
|
85 | ||
86 |
Note: the admin user cannot create repos. |
|
87 | ||
88 |
## Importing data |
|
89 | ||
90 |
One way to import data: |
|
91 | ||
92 |
1. Create your new repo in gitprep |
|
93 |
2. In your local git repo, add a new remote target |
|
some more details on how to ...
|
94 |
``` |
some more details on how to ...
|
95 |
git remote add gitprep git@my.gitprep.server:new-repo.git |
some more details on how to ...
|
96 |
``` |
some more details on how to ...
|
97 |
3. Push all your repo content up in to this new gitprep target |
some more details on how to ...
|
98 |
4. Update your local git repo config such that gitprep is now the origin |
99 | ||
100 |
Copy from /var/lib/gitolite or /var/lib/gitosis |
|
101 | ||
102 |
TBD |
|
103 | ||
Update README.md
|
104 |
## Internal Server Error |
fixed git_bin not found bug
|
105 | |
Update README.md
|
106 |
If you receive an internal server error, look at the log file (gitprep/log/production.log) |
107 |
to see what the problem occurred. |
|
fixed git_bin not found bug
|
108 | |
Fix typos in README
|
109 |
# Installation into own Unix/Linux Server |
improved install process
|
110 | |
Update README.md
|
111 |
GitPrep has its own web server, |
112 |
so you can start using the application very easily. |
|
113 |
This is much better than the way shown above |
|
114 |
because you do not need to setup the Apache environment |
|
115 |
and performance will be much better. |
|
improved README
|
116 | |
added cygwin case
|
117 |
(You can also install GitPrep into Cygwin. |
118 |
If you want to install GitPrep into Cygwin, |
|
119 |
gcc4 and make program are needed.) |
|
120 | ||
improved README
|
121 |
## Create gitprep user |
122 | ||
Update README.md
|
123 |
Create a **gitprep** user. This is not necessary, but recommended. |
improved README
|
124 | |
improved README
|
125 |
useradd gitprep |
126 |
su - gitprep |
|
127 |
cd ~ |
|
128 | ||
improved README
|
129 |
## Download |
improved README
|
130 | |
Update README.md
|
131 |
Download tar.gz archive, expand it and change directory. |
removed Mojoliciosu dependen...
|
132 | |
fixed database file permissi...
|
133 |
curl -kL https://github.com/yuki-kimoto/gitprep/archive/latest.tar.gz > gitprep-latest.tar.gz |
134 |
tar xf gitprep-latest.tar.gz |
|
135 |
mv gitprep-latest gitprep |
|
improved install process
|
136 |
cd gitprep |
improved README
|
137 | |
138 |
## Setup |
|
139 | ||
Update README.md
|
140 |
To setup GitPrep, execute the following command. All of the needed modules will be installed. |
improved README
|
141 | |
improved install process
|
142 |
./setup.sh |
143 | ||
144 |
## Test |
|
145 | ||
Update README.md
|
146 |
Run the test to check if the setup process was successful or not. |
improved install process
|
147 | |
148 |
prove t |
|
149 | ||
Update README.md
|
150 |
If "All tests successful" is shown, the setup process was successful. |
improved install process
|
151 | |
152 |
## Configuration |
|
153 | ||
154 |
Same as Shared Server's Configuration section. |
|
improved README
|
155 | |
156 |
## Operation |
|
157 | ||
158 |
### Start |
|
159 | ||
Update README.md
|
160 |
You can start the application by running the provided gitprep script. |
161 |
The application is run in the background and the port is **10020** by default. |
|
improved README
|
162 | |
163 |
./gitprep |
|
164 | ||
Update README.md
|
165 |
Then access the following URL. |
Fix typos in README
|
166 | |
improved README
|
167 |
http://localhost:10020 |
Fix typos in README
|
168 | |
Update README.md
|
169 |
If you want to change the port, edit gitprep.conf. |
170 |
If you cannot access this port, you might change the firewall settings. |
|
improved README
|
171 | |
172 |
### Stop |
|
173 | ||
Update README.md
|
174 |
You can stop the application by adding the **--stop** option. |
improved README
|
175 | |
176 |
./gitprep --stop |
|
177 | ||
improve readme
|
178 |
### Operation from root user |
improved README
|
179 | |
Update README.md
|
180 |
You can manage the application from the root user. |
improved README
|
181 | |
Update README.md
|
182 |
Start the application |
improved install process
|
183 | |
fix readme
|
184 |
sudo -u gitprep /home/gitprep/gitprep/gitprep |
improved install process
|
185 | |
Update README.md
|
186 |
Stop the application |
improved install process
|
187 | |
fix readme
|
188 |
sudo -u gitprep /home/gitprep/gitprep/gitprep --stop |
improved install process
|
189 | |
Update README.md
|
190 |
If you want to start the application when the OS starts, |
improve readme
|
191 |
add the start application command to **rc.local**(Linux). |
improved install process
|
192 | |
Update README.md
|
193 |
If you want to make it easy to manage gitprep, |
194 |
then create a run script. |
|
Fix typos in README
|
195 | |
improved README
|
196 |
mkdir -p /webapp |
fix readme
|
197 |
echo '#!/bin/sh' > /webapp/gitprep |
cleanup and improve readme, ...
|
198 |
echo 'su - gitprep -c "/home/gitprep/gitprep/gitprep $*"' >> /webapp/gitprep |
fix readme
|
199 |
chmod 755 /webapp/gitprep |
improved install process
|
200 | |
Update README.md
|
201 |
You can start and stop the application with the following command. |
Fix typos in README
|
202 | |
improved README
|
203 |
# Start or Restart |
204 |
/webapp/gitprep |
|
Fix typos in README
|
205 | |
improved install process
|
206 |
# Stop |
improved README
|
207 |
/webapp/gitprep --stop |
Fix typos in README
|
208 | |
improved install process
|
209 |
## Developer |
improved README
|
210 | |
Update README.md
|
211 |
If you are a developer, you can start the application in development mode. |
improved README
|
212 | |
fixed readme
|
213 |
./morbo |
improved README
|
214 | |
Update README.md
|
215 |
Then access the following URL. |
Fix typos in README
|
216 | |
improved README
|
217 |
http://localhost:3000 |
improved install process
|
218 | |
219 |
If you have git, it is easy to install from git. |
|
220 | ||
221 |
git clone git://github.com/yuki-kimoto/gitprep.git |
|
222 | ||
Fix typos in README
|
223 |
It is useful to write configuration in ***gitprep.my.conf***, not gitprep.conf. |
improved install process
|
224 | |
add faq
|
225 |
## FAQ |
226 | ||
227 |
### blame don't work |
|
228 | ||
229 |
In Gitprep, blame page use "git blame --line-porcelain". In old git, there is no --line-porcelain option. |
|
improve readme
|
230 |
We don't know when --line-porcelain was added to git. |
add faq
|
231 |
At least, blame page work well in git 1.8.2.1. |
232 | ||
233 |
### How to upgrade GitPrep |
|
234 | ||
add a little info to reduce ...
|
235 |
It is very easy. you only overwrite all files except for "gitprep.conf". |
add faq
|
236 | |
237 |
If you want to upgrade by "git pull", you can do it. |
|
238 |
you create "gitprep.my.conf" copied from "gitprep.my.conf", |
|
239 |
and do "git pull" |
|
240 | ||
add a little info to reduce ...
|
241 |
If you get a rainbow unicorn t-rex error after upgrading, you might be missing |
improve pod
|
242 |
a new CPAN dependency. Rerun the /setup/setup.php on brower |
243 |
or rerun setup.sh on command line. |
|
add a little info to reduce ...
|
244 | |
improve pod
|
245 |
### I can't push large repository by http protocol |
add FAQ large repository can...
|
246 | |
improve faq of pushing lerge...
|
247 |
There are some reasons. |
add FAQ large repository can...
|
248 | |
fix readme
|
249 |
**1. Git version is old** |
improve faq of pushing lerge...
|
250 | |
251 |
If you see "error: RPC failed; result=56, HTTP code = 200" , your git maybe old. |
|
252 |
Please upgrade to latest git. I checked git version 1.8.5.5. |
|
253 | ||
254 |
**2. GitPrep restriction** |
|
255 | ||
256 |
GitPrep restrict max post message size 10MB(This is default of Mojolicious) |
|
257 | ||
258 |
You maybe see the following error |
|
259 | ||
260 |
Delta compression using up to 4 threads. |
|
261 |
Compressing objects: 100% (17830/17830), done. |
|
262 |
Writing objects: 100% (18281/18281), 687.05 MiB | 129.92 MiB/s, done. |
|
263 |
Total 18281 (delta 295), reused 18281 (delta 295) |
|
264 |
error: RPC failed; result=22, HTTP code = 413 |
|
265 |
fatal: The remote end hung up unexpectedly |
|
266 |
fatal: The remote end hung up unexpectedly |
|
267 | ||
268 |
Please increase increase the value of MOJO_MAX_MESSAGE_SIZE |
|
269 |
|
|
270 |
# 1GB |
|
271 |
export MOJO_MAX_MESSAGE_SIZE=1024000000 |
|
272 | ||
273 |
**3. git restriction** |
|
274 | ||
275 |
git restrict post max size via http protocol. |
|
276 |
http.postBuffer value of git config is maybe small. |
|
277 | ||
278 |
You maybe see the following error message. |
|
279 | ||
280 |
error: RPC failed; result=56, HTTP code = 200 |
|
281 |
fatal: The remote end hung up unexpectedly |
|
282 |
Counting objects: 18281, done. |
|
283 |
Delta compression using up to 4 threads. |
|
284 |
Compressing objects: 100% (17830/17830), done. |
|
285 |
Writing objects: 100% (18281/18281), 687.05 MiB | 133.23 MiB/s, done. |
|
286 |
Total 18281 (delta 295), reused 18281 (delta 295) |
|
287 |
fatal: The remote end hung up unexpectedly |
|
288 |
Everything up-to-date |
|
289 | ||
290 |
Please increase the value of http.postBuffer. |
|
291 |
|
|
292 |
# 1GB |
|
293 |
git config http.postBuffer 1024000000 |
|
add FAQ large repository can...
|
294 | |
Improve document
|
295 |
### I can't create repository and see error message when I create repository with readme |
296 | ||
297 |
If you see the following error message in log/production.log |
|
298 | ||
299 |
[Wed Feb 12 15:27:02 2014] [error] ... Can't execute git commit ... |
|
300 | ||
301 |
you need to set User name and Email of git. |
|
302 |
Please set user.name and user.email. |
|
303 | ||
304 |
git config --global user.name "gitprep" |
|
305 |
git config --global user.email "gitprep@example.com" |
|
306 | ||
fix pod
|
307 |
### How to use reverse proxy? |
improve readme
|
308 | |
309 |
You can use GitPrep via reverse proxy access |
|
310 | ||
311 |
---------------------------- ------------ |
|
312 |
---->| Web Server(Reverse proxy)|---->|GitPrep | |
|
313 |
<----| (Apache, etc) |<----| | |
|
314 |
---------------------------- ------------ |
|
315 | ||
316 |
I show apache config example. |
|
317 |
You can use Name virtual host. |
|
318 |
|
|
319 |
# HTTP |
|
320 |
<VirtualHost *:80> |
|
321 | ||
322 |
ServerName myhost.com |
|
323 |
<Proxy *> |
|
324 |
Order deny,allow |
|
325 |
Allow from all |
|
326 |
</Proxy> |
|
327 |
|
|
328 |
ProxyRequests Off |
|
329 |
ProxyPreserveHost On |
|
330 |
ProxyPass / http://localhost:10020/ keepalive=On |
|
331 |
ProxyPassReverse / http://localhost:10020/ |
|
332 |
RequestHeader set X-Forwarded-HTTPS "0" |
|
333 |
|
|
334 |
</VirtualHost> |
|
335 | ||
336 |
If you use GitPrep vis https, you should set X-Forwarded-HTTPS Request Header. |
|
337 | ||
338 |
# HTTPS |
|
339 |
<VirtualHost *:443> |
|
340 | ||
341 |
ServerName myhost.com |
|
342 |
<Proxy *> |
|
343 |
Order deny,allow |
|
344 |
Allow from all |
|
345 |
</Proxy> |
|
346 |
|
|
347 |
ProxyRequests Off |
|
348 |
ProxyPreserveHost On |
|
349 |
ProxyPass / http://localhost:10020/ keepalive=On |
|
350 |
ProxyPassReverse / http://localhost:10020/ |
|
351 |
RequestHeader set X-Forwarded-HTTPS "1" |
|
352 |
</VirtualHost> |
|
353 | ||
add document about importing...
|
354 |
### How to import already existing repositories? |
355 | ||
356 |
You can import already existing repositories by **script/import_rep** script. |
|
357 | ||
358 |
cd script |
|
359 |
./import_rep -u kimoto rep_dir |
|
360 | ||
361 |
**-u** is user name. rep_dir must contains git respoitories like the following. |
|
362 | ||
fix pod
|
363 |
rep_dir/project1.git |
364 |
/project2.git |
|
365 |
/project3.git |
|
366 |
/project3.git |
|
add document about importing...
|
367 | |
fix pod
|
368 |
If **description** file exists in git repository, it is copied. |
add document about importing...
|
369 | |
fix bug that can't create co...
|
370 |
### I can't add collabortor more than one |
371 | ||
372 |
This is GitPrep bug before version 1.5.1. |
|
373 |
Please use after version 1.5.2. |
|
374 | ||
375 |
If you contine to use GitPrep before version 1.5.1, |
|
376 |
collaboration table is broken. |
|
377 |
Please fix it by the following way. |
|
378 | ||
379 |
# Run SQLite client |
|
380 |
sqlite3 data/gitprep.db |
|
381 |
|
|
382 |
# drop collaboration table |
|
383 |
drop table collaboration; |
|
384 |
|
|
385 |
# Restart |
|
386 |
./gitprep |
|
387 | ||
support time zone
|
388 |
## I want to set time zone. |
389 | ||
390 |
OK. GitPrep suport time zone. You can set time_zone option in conig file. |
|
391 | ||
392 |
[basic] |
|
393 |
;;; Time Zone |
|
394 |
;;; GitPrep time zone is GMT by default |
|
395 |
;;; You can set your local time zone. |
|
396 |
time_zone=+9:00 |
|
397 | ||
add web site link
|
398 |
## Web Site |
399 | ||
400 |
[GitPrep Web Site](http://perlcodesample.sakura.ne.jp/gitprep-site/) |
|
401 | ||
fix pod
|
402 |
## Internally Using Library |
add internally using project
|
403 | |
404 |
* [Config::Tiny](http://search.cpan.org/dist/Config-Tiny/lib/Config/Tiny.pm) |
|
405 |
* [DBD::SQLite](http://search.cpan.org/dist/DBD-SQLite/lib/DBD/SQLite.pm) |
|
406 |
* [DBI](http://search.cpan.org/dist/DBI/DBI.pm) |
|
407 |
* [DBIx::Connector](http://search.cpan.org/dist/DBIx-Connector/lib/DBIx/Connector.pm) |
|
408 |
* [DBIx::Custom](http://search.cpan.org/dist/DBIx-Custom/lib/DBIx/Custom.pm) |
|
409 |
* [Mojolicious](http://search.cpan.org/~kimoto/DBIx-Custom/lib/DBIx/Custom.pm) |
|
410 |
* [Mojolicious::Plugin::INIConfig](http://search.cpan.org/dist/Mojolicious-Plugin-INIConfig/lib/Mojolicious/Plugin/INIConfig.pm) |
|
411 |
* [mojo-legacy](https://github.com/jamadam/mojo-legacy) |
|
412 |
* [Object::Simple](http://search.cpan.org/dist/Object-Simple/lib/Object/Simple.pm) |
|
use hoedown for fenced code ...
|
413 |
* [Text::Markdown::Hoedown](http://search.cpan.org/~tokuhirom/Text-Markdown-Hoedown-1.01/lib/Text/Markdown/Hoedown.pm) |
add internally using project
|
414 |
* [Validator::Custom](http://search.cpan.org/dist/Validator-Custom/lib/Validator/Custom.pm) |
415 | ||
add WebDBViewer link
|
416 |
## Sister project |
417 | ||
add Text::Markdown::Discount...
|
418 |
These are my Perl web application projects. |
419 | ||
fix WebDBViewer link
|
420 |
* [WebDBViewer](http://perlcodesample.sakura.ne.jp/webdbviewer-site/) - Database viewer to see database information on web browser. |
add Text::Markdown::Discount...
|
421 |
* [TaskDeal](http://perlcodesample.sakura.ne.jp/taskdeal-site/) - Setup or deploy multiple environments on web browser. Ruby Chef alternative tool. |
add WebDBViewer link
|
422 | |
improved install process
|
423 |
## Copyright & license |
424 | ||
Copyright statement fix.
|
425 |
Copyright 2012-2013 Yuki Kimoto. All rights reserved. |
improved install process
|
426 | |
427 |
This program is free software; you can redistribute it and/or modify it |
|
428 |
under the same terms as Perl itself. |