aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2022-10-11 00:41:42 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2022-10-11 00:41:42 +0200
commitad8971195481513b8624604d841807d803a34dca (patch)
tree4ebeaa2746293a1838cf1a424dbb1d290a9341dc
parentmån 10 okt 2022 20:52:57 CEST (diff)
downloadwiki-public-ad8971195481513b8624604d841807d803a34dca.tar.gz
wiki-public-ad8971195481513b8624604d841807d803a34dca.tar.xz
tis 11 okt 2022 00:41:42 CEST
-rw-r--r--.vimwiki_tags4
-rw-r--r--GitServer.wiki22
-rw-r--r--gitserver-documentation.wiki103
3 files changed, 79 insertions, 50 deletions
diff --git a/.vimwiki_tags b/.vimwiki_tags
index 94692fd..1e0adc1 100644
--- a/.vimwiki_tags
+++ b/.vimwiki_tags
@@ -5,5 +5,5 @@
!_TAG_PROGRAM_NAME Vimwiki Tags
!_TAG_PROGRAM_URL https://github.com/vimwiki/vimwiki
!_TAG_PROGRAM_VERSION 2.5
-TODO GitServer.wiki 59;" vimwiki:GitServer\tGitServer#Git Server#Autentisering#Autentisering SSH#Problem
-TODO GitServer.wiki 102;" vimwiki:GitServer\tGitServer#Taggning#Cleanup
+TODO GitServer.wiki 45;" vimwiki:GitServer\tGitServer#Git Server#Autentisering#Autentisering SSH#Problem
+TODO GitServer.wiki 88;" vimwiki:GitServer\tGitServer#Taggning#Cleanup
diff --git a/GitServer.wiki b/GitServer.wiki
index ff34888..3a29ef7 100644
--- a/GitServer.wiki
+++ b/GitServer.wiki
@@ -2,7 +2,6 @@
- [[#Git Server|Git Server]]
- [[#Git Server#Autentisering|Autentisering]]
- [[#Git Server#Autentisering#Autentisering HTTP|Autentisering HTTP]]
- - [[#Git Server#Autentisering#Autentisering HTTP#Nuläget|Nuläget]]
- [[#Git Server#Autentisering#Autentisering HTTP#Framtiden|Framtiden]]
- [[#Git Server#Autentisering#Autentisering SSH|Autentisering SSH]]
- [[#Git Server#Autentisering#Autentisering SSH#Problem|Problem]]
@@ -29,26 +28,13 @@ https://git.hornquist.se
== Autentisering ==
=== Autentisering HTTP ===
-==== Nuläget ====
-Det finns grunderna till ett autentiseringsscript skviret. I nuläget
-släpps alla in på https://git.hornquist.se/vimwiki , men enbart jag
-släpps in på övriga sidor.
-
-Vid felaktig inloggning och försök till inloggning på rootsidan hamnar
-man på en suspekt 404 sida. Se istället till att min:
-- [ ] kan logga in på root-sidan
-- [ ] vid misslyckande hamnar tillbaka på login-sidan med ett
- felmedelande.
-
==== Framtiden ====
-
Det jag vill ha är ett grupp-baserat system där jag enkelt kan lägga
till användare. Varje användare är med i ett antal gruppen, och varje
repo har en användare och en grupp. Autentiseringssystemet ska gärna
vara skillt från Unix's system (men fungera ungefär lika dant).
=== Autentisering SSH ===
-
Gitolite används för authentisering på serversidan. Dock har det vissa
problem:
@@ -100,8 +86,6 @@ find -type d -name \*.git -execdir env GIT_DIR={} git config gitweb.category Liu
== Cleanup ==
:TODO:
-
-- [X] `gitweb.gatecory` is set on most right now.
- [ ] `gitweb.category` should be set automaticly
= Hooks =
@@ -109,11 +93,9 @@ find -type d -name \*.git -execdir env GIT_DIR={} git config gitweb.category Liu
- [[gitserver-documentation]]
=== Framtida förbättringar ===
-- Resterande krokar
-- kör olika krokar beroende på `git config gitweb.category`
- `enable-remote-branches` ([[man:cgitrc#5]])
-- Alt-text för speciella bilder
-
+- Vad händer om ett repo har både subdir och kattegori
+ - Vad händer om de inte stämmer överrens?
=== Default config ===
{{{
diff --git a/gitserver-documentation.wiki b/gitserver-documentation.wiki
index b4328b4..f067fef 100644
--- a/gitserver-documentation.wiki
+++ b/gitserver-documentation.wiki
@@ -1,29 +1,76 @@
-- Hur körs krokar
- - Standardkrokar
- - Lägga till egna
-- Hur sätts git konfiguration
-- Här sätts description
-- Hur byter man standardgren
-- Hur underkataloger och taggar interagerar
- - Vad de olika underkatalogerna är till för
- - Vad de olika taggarna är till för
-- Is owner from cgit? Is it supported?
-- Which configuration variables are supported, and what do they do
- - Better script for setting them
- - Should take core from a global place
- - then update that with repo specific
- - have way to unset
-- Allow shared repositories?
-- What happens if both subdir, and category
-
-== Dokumentation ==
-At each push hooks are run [GITHOOKS]
-
-Configuration is easiest set to an orphan branch called gitconfig
-The file .gitconfig will be loaded (by what?)
-
-== Configuration keys of interest ==
-
-`cgit.description` :: Displayed description of repo
-`cgit.defbranch` :: Default branch to show
+= Hooks =
+Each repository is initialized with a hook directory which symlinks to
+a global hooks directory. In the global hooks directory, each
+(relevant) hook is symlinked to [[https://git.hornquist.se/githooks/about/|GitHooks dispatcher]], which
+will run every hooks in `${HOOK_DIR}/${HOOK_NAME}.d` (non-recursively)
+
+== Hook Dir ==
+Hooks are searched for in
+- `/etc/githooks/hooks` (configurable through `githooks.hook-dir`)
+- `${GIT_REF}:.githooks/` for every ref affected by the push
+
+== Default Hooks ==
+[[https://git.hornquist.se/githooks-hooks/|The global hooks can be viewed here.]]
+
+== Repo Configuration ==
+A [[https://git.hornquist.se/githooks-hooks/tree/post-receive.d/gitconfig|gitconfig hook]] is run on post-receive.
+
+It reads the git configuration file `${GIT_REF}:.gitconfig` from the
+pushed ref, and updates the repos config file.
+
+It's recommended to create a new orphan branch called `gitconfig`, and
+handle all configuration from there.
+
+=== Repo Description ===
+Must be set through `gitweb.description`.
+
+=== Configuration keys of interest ===
+`gitweb.description` :: Displayed description of repo
`gitweb.category` :: Category, (unless in a subdirectory)
+`gitweb.homepage` :: Will be added as a tab
+`cgit.defbranch` :: Default branch to show
+`cgit.logo` :: Will replace cgit logo for this repo, see [[#Logo]]
+
+Read more: [[man:cgitrc#5]]
+
+==== Logo ====
+The prefered way to publish logo:s is thourgh the repo itself, set
+`cgit.logo` to https://git.hornquist.se/REPO_NAME/plain/LOGO.PNG?h=*BRANCHNAME*
+
+== Re-running hooks ==
+The script `~git/rerun-hook.py` is available on the server. It takes
+a path to a repo, and executes the post-receive hook as if an initial
+push containing everything in the repo.
+
+= Gitweb Categories =
+Archive :: Repos which will probably never again get touched
+doc :: "Pure" text repos.
+fork :: Repos which are forked from elsewhere.
+
+= Subdirectories =
+archpkg :: Arch PKGBUILD files.
+houseOfMad :: An old game
+liu :: Schoolwork from LiU
+puppet :: Puppet Modules
+scheme :: Misc scheme code
+unity :: Misc Unity (game engine) code
+
+{{{
+ __________________________
+< Den som bestämde gjorde >
+ --------------------------
+\ . .
+ \ / `. .' "
+ \ .---. < > < > .---.
+ \ | \ \ - ~ ~ - / / |
+ _____ ..-~ ~-..-~
+ | | \~~~\.' `./~~~/
+ --------- \__/ \__/
+ .' O \ / / \ "
+ (_____, `._.' | } \/~~~/
+ `----. / } | / \__/
+ `-. | / | / `. ,~~|
+ ~-.__| /_ - ~ ^| /- _ `..-'
+ | / | / ~-. `-. _ _ _
+ |_____| |_____| ~ - . _ _ _ _ _>
+}}}