cgit erweitern, forgejo ersetzen? #1083

Open
opened 2026-03-01 16:51:00 +01:00 by mg · 1 comment
Owner
  • via ansible deployen ODER doku wie für tor1 anlegen, dann in neuem Repo
    • restic + ufw konfigurieren
    • in traefik konfigurieren
      • dns-records anpassen?
    • in dashboard aufnehmen?
      • dns-records anpassen?
  • Checkliste für VM durchgehen
  • apache härten + fail2ban
    • Schreibrechte einschränken
    • prüfen ob das git:// Protkoll möglich ist
  • Lösung finden
    • renovate
    • dotfiles clone
    • routeros-config-Backup
    • Mirror
    • adlist Mikrotik
  • Migration Repos (siehe repos_neu) (status neu anfangen!)
    • alle Branche mitnehmen
    • VORHER neu aufstezen mit playbook (sudo a2enmod cgi prüfen)
    • neues repo für latex beamer
    • bare-repos direkt ovn gitea kopieren?
    • Private Repos (extra Ordner oder nur lokal, wie dann Backup)
    • Script entwicklen zum Repos anlegen
      • name=ansible-devspace && sudo mkdir -p $name && cd /srv/git/$name && sudo chown mg:mg -R /srv/git/$name && git init --bare /srv/git/$name oder via ansible-rolle
    • Default-branch auf master setzen
  • Loging verbieten/git-shell?
  • Config durchgehen: https://git.zx2c4.com/cgit/tree/cgitrc.5.txt
  • clone: git clone mg@gitsrv.mgrote.net:/srv/git/latex.git
  • Syntax Highlighting einbauen
  • Repo "Metadaten" setzen
    • via description Datei
  • CI via post-receive-hooks? -->
    • autmatiasieurng rum bauen post-receive in hooks + chmod +x
    • script welches nach # TODO grept und meldet
    • motd/figlet bei push?
    • git clone , remote befehl als text in cgit
  • als archive.git.mgrote.net für RO-Repos?
- [x] via ansible deployen ODER doku wie für tor1 anlegen, dann in neuem Repo - [x] restic + ufw konfigurieren - [x] in traefik konfigurieren - [x] dns-records anpassen? - [x] in dashboard aufnehmen? - [x] dns-records anpassen? - [x] Checkliste für VM durchgehen - [x] apache härten + fail2ban - [x] Schreibrechte einschränken - [ ] prüfen ob das `git://` Protkoll möglich ist - [ ] Lösung finden - [ ] renovate - [ ] dotfiles clone - [ ] routeros-config-Backup - [ ] Mirror - [ ] adlist Mikrotik - [ ] Migration Repos (siehe `repos_neu`) (status neu anfangen!) - [x] alle Branche mitnehmen - [ ] VORHER neu aufstezen mit playbook (`sudo a2enmod cgi` prüfen) - [x] neues repo für latex beamer - [ ] bare-repos direkt ovn gitea kopieren? - [x] Private Repos (extra Ordner oder nur lokal, wie dann Backup) - [x] $projects_list https://git-scm.com/docs/gitweb (in Script bedenken) - [x] ggf explizit auflisten, dort auch metadaten setzen - [x] Script entwicklen zum Repos anlegen - [x] `name=ansible-devspace && sudo mkdir -p $name && cd /srv/git/$name && sudo chown mg:mg -R /srv/git/$name && git init --bare /srv/git/$name` oder via ansible-rolle - [x] Default-branch auf master setzen - [x] Loging verbieten/git-shell? - [x] Config durchgehen: https://git.zx2c4.com/cgit/tree/cgitrc.5.txt - [x] clone: ``git clone mg@gitsrv.mgrote.net:/srv/git/latex.git`` - [x] Syntax Highlighting einbauen - [x] Repo "Metadaten" setzen - [x] via `description` Datei - [ ] CI via post-receive-hooks? --> - [ ] autmatiasieurng rum bauen `post-receive in hooks + chmod +x` - [ ] script welches nach ``# TODO`` grept und meldet - [ ] motd/figlet bei push? - [ ] git clone , remote befehl als text in cgit - [x] als archive.git.mgrote.net für RO-Repos?
Author
Owner

Config aktuell



-----
cgtirc

css=/cgit.css
logo=/cgit.png
scan-path=/srv/git


apache2conf
ServerName gitsrv.mgrote.net

# Essential modules
LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so
LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so
LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so
LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so
LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so

# Listen directive (CRITICAL - tells Apache what port to use)
Listen 80

# Log paths using environment variable
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

<VirtualHost *:80>
  ServerName gitsrv.mgrote.net

  # Static assets FIRST (before ScriptAlias!)
  Alias /cgit.css /usr/share/cgit/cgit.css
  Alias /cgit.png /usr/share/cgit/cgit.png

  # CGI handler LAST
  ScriptAlias / /usr/lib/cgit/cgit.cgi/

  <Directory "/usr/lib/cgit">
    Options +ExecCGI +FollowSymLinks
    AllowOverride None
    Require all granted
  </Directory>

  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>




dir
root@gitsrv /srv/git
> tree
.
└── testrepo
    ├── branches
    ├── config
    ├── description
    ├── HEAD
    ├── hooks
    │   ├── applypatch-msg.sample
    │   ├── commit-msg.sample
    │   ├── fsmonitor-watchman.sample
    │   ├── post-update.sample
    │   ├── pre-applypatch.sample
    │   ├── pre-commit.sample
    │   ├── pre-merge-commit.sample
    │   ├── prepare-commit-msg.sample
    │   ├── pre-push.sample
    │   ├── pre-rebase.sample
    │   ├── pre-receive.sample
    │   ├── push-to-checkout.sample
    │   ├── sendemail-validate.sample
    │   └── update.sample
    ├── info
    │   └── exclude
    ├── objects
    │   ├── 07
    │   │   └── 6e10f91f1166d7448cc8f094a96d6d03b396ba
    │   ├── e6
    │   │   └── 9de29bb2d1d6434b8b29ae775ad8c2e48c5391
    │   ├── fe
    │   │   └── a588cfff97efae22ac6f60ee142088bbc7ca38
    │   ├── info
    │   └── pack
    └── refs
        ├── heads
        │   └── master
        └── tags

14 directories, 22 files
mode auf repo = mg + 0777


remote

mg@gitsrv ~/test (master)
> git remote -v
origin  mg@gitsrv:/srv/git/testrepo (fetch)
origin  mg@gitsrv:/srv/git/testrepo (push)



sudo a2enmod cgi
sudo apachectl configtest



Config aktuell ```bash ----- cgtirc css=/cgit.css logo=/cgit.png scan-path=/srv/git apache2conf ServerName gitsrv.mgrote.net # Essential modules LoadModule mpm_event_module /usr/lib/apache2/modules/mod_mpm_event.so LoadModule alias_module /usr/lib/apache2/modules/mod_alias.so LoadModule authz_core_module /usr/lib/apache2/modules/mod_authz_core.so LoadModule dir_module /usr/lib/apache2/modules/mod_dir.so LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so # Listen directive (CRITICAL - tells Apache what port to use) Listen 80 # Log paths using environment variable ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined <VirtualHost *:80> ServerName gitsrv.mgrote.net # Static assets FIRST (before ScriptAlias!) Alias /cgit.css /usr/share/cgit/cgit.css Alias /cgit.png /usr/share/cgit/cgit.png # CGI handler LAST ScriptAlias / /usr/lib/cgit/cgit.cgi/ <Directory "/usr/lib/cgit"> Options +ExecCGI +FollowSymLinks AllowOverride None Require all granted </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost> dir root@gitsrv /srv/git > tree . └── testrepo ├── branches ├── config ├── description ├── HEAD ├── hooks │   ├── applypatch-msg.sample │   ├── commit-msg.sample │   ├── fsmonitor-watchman.sample │   ├── post-update.sample │   ├── pre-applypatch.sample │   ├── pre-commit.sample │   ├── pre-merge-commit.sample │   ├── prepare-commit-msg.sample │   ├── pre-push.sample │   ├── pre-rebase.sample │   ├── pre-receive.sample │   ├── push-to-checkout.sample │   ├── sendemail-validate.sample │   └── update.sample ├── info │   └── exclude ├── objects │   ├── 07 │   │   └── 6e10f91f1166d7448cc8f094a96d6d03b396ba │   ├── e6 │   │   └── 9de29bb2d1d6434b8b29ae775ad8c2e48c5391 │   ├── fe │   │   └── a588cfff97efae22ac6f60ee142088bbc7ca38 │   ├── info │   └── pack └── refs ├── heads │   └── master └── tags 14 directories, 22 files mode auf repo = mg + 0777 remote mg@gitsrv ~/test (master) > git remote -v origin mg@gitsrv:/srv/git/testrepo (fetch) origin mg@gitsrv:/srv/git/testrepo (push) sudo a2enmod cgi sudo apachectl configtest ```
mg changed title from cgit to cgit erweitern, forgejo ersetzen? 2026-03-14 13:43:17 +01:00
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mg/homeserver#1083
No description provided.