diff options
| author | ozpv <39195175+ozpv@users.noreply.github.com> | 2026-05-30 23:48:41 -0500 |
|---|---|---|
| committer | ozpv <39195175+ozpv@users.noreply.github.com> | 2026-05-30 23:48:41 -0500 |
| commit | 97b984780a539a1a5bc5d6e7adacb85d815a8135 (patch) | |
| tree | 0933d1037e207c6125bc53c6c1036c674c0a2600 | |
| parent | 3d5222bc40a298c9e579ac9de813f713c9751728 (diff) | |
reword
| -rw-r--r-- | public/blog/how-to-self-host-a-git-server.html | 8 |
1 files 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 <p>On your home computer, set up a git repo as well.</p>
<pre><code>mkdir repo
cd repo
-git init --bare
+git init
git remote add origin git@example.com:/srv/git/repo.git
</code></pre>
-<p>Make some changes. For example, create a file, and try git push. It should work.</p>
+<p>Make some changes. For example, create a file and try git push. It should work.</p>
<pre><code>touch file.txt
git add .
git commit -m "changes"
-git push origin master
+git push origin main
</code></pre>
<p>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.</p>
<pre><code>deluser git sudo
@@ -66,7 +66,7 @@ o <p>Finally, prevent port forwarding by prepending this to each key in ~/.ssh/authorized_keys in the git user directory.</p>
<pre><code>no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty
</code></pre>
-<p>Attempting to login as git using ssh <a href="mailto:git@example.com">git@example.com</a> should output an error and close the connection, such as this one:</p>
+<p>Attempting to login as git using ssh <a href="mailto:git@example.com">git@example.com</a> should output an error such as this one and close the connection.</p>
<pre><code>fatal: Interactive git shell is not enabled.
hint: ~/git-shell-commands should exist and have read and execute access.
Connection to example.com closed.
|
