removing
parent
ed957ddf33
commit
d97042a1c0
2 changed files with 0 additions and 82 deletions
|
|
@ -1,81 +0,0 @@
|
||||||
Git server notes (incomplete / WIP)
|
|
||||||
|
|
||||||
```
|
|
||||||
Ensure git-shell can be used
|
|
||||||
===============================
|
|
||||||
|
|
||||||
/etc/shells
|
|
||||||
-----------
|
|
||||||
/usr/bin/git-shell
|
|
||||||
|
|
||||||
|
|
||||||
Allow keys outside $HOME
|
|
||||||
===============================
|
|
||||||
|
|
||||||
/etc/ssh/sshd_config
|
|
||||||
--------------------
|
|
||||||
Match User git
|
|
||||||
AuthorizedKeysFile /var/git/ssh/authorized_keys
|
|
||||||
|
|
||||||
systemctl restart sshd.service
|
|
||||||
|
|
||||||
|
|
||||||
Prepare fundamentals, test repo
|
|
||||||
===============================
|
|
||||||
|
|
||||||
MYUSER="abcdefg"
|
|
||||||
|
|
||||||
groupadd -g 55555 git
|
|
||||||
useradd -g git -u 55555 \
|
|
||||||
-s /usr/bin/git-shell \
|
|
||||||
-d /var/git/repos \
|
|
||||||
git
|
|
||||||
|
|
||||||
mkdir -p /var/git/{ssh,repos}
|
|
||||||
touch /var/git/repos/.hushlogin
|
|
||||||
cp /home/$MYUSER/.ssh/authorized_keys \
|
|
||||||
/var/git/ssh/authorized_keys
|
|
||||||
chmod 0700 /var/git/ssh
|
|
||||||
chmod 0600 /var/git/ssh/authorized_keys
|
|
||||||
|
|
||||||
mkdir /var/git/repos/git-shell-commands
|
|
||||||
cat << 'EOF' > /var/git/repos/git-shell-commands/no-interactive-login
|
|
||||||
#!/bin/sh
|
|
||||||
echo "git interactive login not supported"
|
|
||||||
exit 128
|
|
||||||
EOF
|
|
||||||
chmod 0755 /var/git/repos/git-shell-commands/no-interactive-login
|
|
||||||
|
|
||||||
mkdir -p /var/git/repos/${MYUSER}/test.git
|
|
||||||
cd /var/git/repos/${MYUSER}/test.git
|
|
||||||
git init --bare --shared
|
|
||||||
|
|
||||||
chown -R git:git /var/git
|
|
||||||
|
|
||||||
|
|
||||||
Push from workstation to above
|
|
||||||
===============================
|
|
||||||
|
|
||||||
mkdir test
|
|
||||||
cd test
|
|
||||||
git init
|
|
||||||
git config user.email myuser@domain
|
|
||||||
git config user.name myuser
|
|
||||||
echo "README" > README
|
|
||||||
git add .
|
|
||||||
git commit -m "Initial commit" README
|
|
||||||
git remote add origin git@example.com:myuser/test.git
|
|
||||||
|
|
||||||
|
|
||||||
Webview Research
|
|
||||||
========================
|
|
||||||
|
|
||||||
https://sourcevirtues.com/2012/03/04/setup-git-server-with-https-on-debian-stable/
|
|
||||||
https://floatingoctothorpe.uk/2017/setting-up-cgit-on-debian.html
|
|
||||||
https://codemadness.org/stagit.html
|
|
||||||
|
|
||||||
cgit gotcha, order matters:
|
|
||||||
snapshots=tar.gz tar.bz2 zip
|
|
||||||
scan-path=/path/to/your/repositories
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
- [[Git Multi SSH]]
|
- [[Git Multi SSH]]
|
||||||
- [[Git Quickstart]]
|
- [[Git Quickstart]]
|
||||||
- [[Git Rewrite User]]
|
- [[Git Rewrite User]]
|
||||||
- [[Git Server]]
|
|
||||||
- [[Gitea Mirror]]
|
- [[Gitea Mirror]]
|
||||||
- [[GitLab Anchors]]
|
- [[GitLab Anchors]]
|
||||||
- [[Glibc IPv4]]
|
- [[Glibc IPv4]]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue