aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorТатьяна Фарбер <alexandr@asustem.ru>2026-10-21 14:50:10 +0400
committerТатьяна Фарбер <alexandr@asustem.ru>2026-10-21 14:50:10 +0400
commitd67840fa8defc5b46f184665b1fc3e0dbad1dc77 (patch)
treeb1ea6bf9af7c3497bb477185987dbf2f7568180a /README.md
parentef94560a1ea8b7ca642da84b0079b8deb6247324 (diff)
readme
Diffstat (limited to 'README.md')
-rw-r--r--README.md74
1 files changed, 73 insertions, 1 deletions
diff --git a/README.md b/README.md
index 5d985f3..bb0707e 100644
--- a/README.md
+++ b/README.md
@@ -58,8 +58,80 @@ git init
git add .
git commit -m "Initial commit"
-git-create private new-api
+git-create private new
git push -u origin --all
```
+
+## Установка cgit
+
+```
+sudo apt update
+sudo apt install cgit spawn-fcgi fcgiwrap
+sudo systemctl status fcgiwrap.socket
+
+```
+
+```
+sudo chown -R git:www-data /home/git/repositories/public
+sudo find /home/git/repositories/public -type d -exec chmod 750 {} \;
+sudo find /home/git/repositories/public -type f -exec chmod 640 {} \;
+sudo chmod +x /home/git
+sudo chmod +x /home/git/repositories
+sudo chmod +x /home/git/repositories/public
+
+```
+
+
+Для запуска из корня:
+
+```
+sudo nano /etc/cgitrc
+
+virtual-root=/
+css=/cgit-css/cgit.css
+logo=/cgit-css/cgit.png
+favicon=/cgit-css/favicon.ico
+enable-git-config=1
+remove-suffix=1
+scan-path=/home/git/repositories/public
+main-title=Asustem.ru
+snapshots=tar.gz zip
+
+
+
+sudo chmod -R 755 /usr/share/cgit/
+
+```
+Тест:
+
+```
+CGIT_CONFIG=/etc/cgitrc /usr/lib/cgit/cgit.cgi
+
+```
+
+Конфигурация nginx:
+
+```
+ location /cgit-css/ {
+ alias /usr/share/cgit/;
+ try_files $uri =404;
+ }
+
+ location / {
+ include fastcgi_params;
+ fastcgi_param SCRIPT_FILENAME /usr/lib/cgit/cgit.cgi;
+ fastcgi_param PATH_INFO $uri;
+ fastcgi_param QUERY_STRING $args;
+ fastcgi_pass unix:/run/fcgiwrap.socket;
+ }
+```
+
+```
+.git/config
+
+[gitweb]
+ description = Мой тестовый репозиторий
+ owner = user
+```