GitServer: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 3: | Zeile 3: | ||
== Initialisierung == | == Initialisierung == | ||
< | <syntaxhighlight lang="bash"> | ||
adduser --shell /usr/bin/git-shell git | adduser --shell /usr/bin/git-shell git | ||
cd /home/git | cd /home/git | ||
Zeile 10: | Zeile 10: | ||
touch authorized_keys | touch authorized_keys | ||
chown -R git.git /home/git | chown -R git.git /home/git | ||
</syntaxhighlight> | |||
* /home/git/.ssh/authorized_keys | |||
<pre> | |||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/Z4t...0blnUDBCr8AEZIj hm@ant | |||
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDH6ej...hrCjPpDy+U1L0W3 hm@mint18.fn.local | |||
</pre> | </pre> | ||
Version vom 9. Juni 2023, 17:20 Uhr
Initialisierung
adduser --shell /usr/bin/git-shell git
cd /home/git
mkdir .ssh
cd .ssh
touch authorized_keys
chown -R git.git /home/git
- /home/git/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC/Z4t...0blnUDBCr8AEZIj hm@ant ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDH6ej...hrCjPpDy+U1L0W3 hm@mint18.fn.local
Leeres Repository einrichten:
mkdir /home/git/repo chown git.git /home/git/repo PROJ=example DIR=/home/git/repo/$PROJ.git mkdir $DIR cd $DIR git --bare init chown -R git.git $DIR
Zugriff
- git clone git@git.f-r-e-i.de:/home/git/repo/example