From 97b984780a539a1a5bc5d6e7adacb85d815a8135 Mon Sep 17 00:00:00 2001 From: ozpv <39195175+ozpv@users.noreply.github.com> Date: Sat, 30 May 2026 23:48:41 -0500 Subject: reword --- public/blog/how-to-self-host-a-git-server.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/blog/how-to-self-host-a-git-server.html b/public/blog/how-to-self-host-a-git-server.html index 871690d..06d3669 100644 --- a/public/blog/how-to-self-host-a-git-server.html +++ b/public/blog/how-to-self-host-a-git-server.html @@ -37,14 +37,14 @@ git init --bare
On your home computer, set up a git repo as well.
mkdir repo
cd repo
-git init --bare
+git init
git remote add origin git@example.com:/srv/git/repo.git
-Make some changes. For example, create a file, and try git push. It should work.
+Make some changes. For example, create a file and try git push. It should work.
touch file.txt
git add .
git commit -m "changes"
-git push origin master
+git push origin main
The git user is no longer required to be a part of the sudo group. We just needed it for a few of the commands above. Remove it.
deluser git sudo
@@ -66,7 +66,7 @@ o
Finally, prevent port forwarding by prepending this to each key in ~/.ssh/authorized_keys in the git user directory.
no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty
-Attempting to login as git using ssh git@example.com should output an error and close the connection, such as this one:
+Attempting to login as git using ssh git@example.com should output an error such as this one and close the connection.
fatal: Interactive git shell is not enabled.
hint: ~/git-shell-commands should exist and have read and execute access.
Connection to example.com closed.
--
cgit v1.2.3