diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-05-10 14:46:07 -0500 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-05-10 14:46:07 -0500 |
| commit | 0063bf9d2b2c416a6317cf45f68847b5720aab49 (patch) | |
| tree | 2c8ab6fd181e481bf9faff65e6a80f4330a5ff54 /forgejno.html | |
| parent | 85a2a330f729d70dfce1b81dc69ec15436a3d44c (diff) | |
updates and new post: 'Summer of PLT'
Diffstat (limited to 'forgejno.html')
| -rw-r--r-- | forgejno.html | 51 |
1 files changed, 8 insertions, 43 deletions
diff --git a/forgejno.html b/forgejno.html index 71246e7..a413440 100644 --- a/forgejno.html +++ b/forgejno.html @@ -7,42 +7,9 @@ <link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="prose.css"> - <style> - summary { - font-family: 'Gelasio'; - color: #888; - } - summary::marker { - color: #888; - } - - code { - font-size: 1rem; - color: #00ff78; - } - </style> - <script> - function htmlTableOfContents() { - var toc = document.getElementById('toc-list'); - var headings = document.body.querySelectorAll('h1, h2, h3, h4, h5, h6'); - headings.forEach(function (heading, index) { - var link = document.createElement('a'); - link.setAttribute('href', '#'+heading.id.toLowerCase()); - link.textContent = heading.textContent; - - var li = document.createElement('li'); - li.appendChild(link); - - toc.appendChild(li); - }); - } - </script> + <script src="toc.js"></script> </head> - <body onload="htmlTableOfContents();"> - <div class="toc"> - <ul id="toc-list"></ul> - </div> - + <body> <div class="content"> <h1 id="title">You Don't Need Forgejo</h1> <p><a href="https://mitchellh.com/writing/ghostty-leaving-github">People</a> @@ -69,7 +36,7 @@ <p class="comment">I'll be using Caddy as the webserver for this setup, but I'll link tutorials for NGINX and Apache if prefer xml configuration files and manual https certificates ;)</p> <p>To keep everything organized, I'll run cgit under a user called "git". Our git repos will be stored in this directory.</p> - <p><code>$ useradd -r -d /var/lib/cgit -s /usr/bin/git-shell git</code></p> + <code>$ useradd -r -d /var/lib/cgit -s /usr/bin/git-shell git</code> <h3 id="cfg-fcgiwrap">fcgiwrap</h3> <p>cgit is served as a <a href="https://en.wikipedia.org/wiki/Common_Gateway_Interface">cgi application</a>.</p> @@ -88,7 +55,7 @@ <li><p>Install cgit with a package manager. This will place the cgit files at /var/www/htdocs/cgit</p></li> <li> <p>Make sure that location is owned by "git", but is readable by all users:</p> - <p><code>$ chown -R git /var/www/htdocs/cgit && chmod -R 764 /var/www/htdocs/cgit</code></p> + <code>$ chown -R git /var/www/htdocs/cgit && chmod -R 764 /var/www/htdocs/cgit</code> </li> </ol> @@ -109,24 +76,22 @@ }</code></pre> <h3 id="cfg-shell">Lock down SSH access</h3> - <p>Using <code>git-shell</code> - blocks normal shell access and allows only git-style SSH commands.</p> + <p>Using <code>git-shell</code> blocks normal shell access and allows only git-style SSH commands.</p> <ol> - <li><p>Create an SSH directory for the <code>git</code> - user: <code>$ install -d -o git -g git -m 700 /var/lib/cgit/.ssh</code></p></li> + <li><p>Create an SSH directory for the git user: <code>$ install -d -o git -g git -m 700 /var/lib/cgit/.ssh</code></p></li> <li><p>Add your public key to <code>/var/lib/cgit/.ssh/authorized_keys</code> with mode <code>600</code>.</p></li> </ol> <h3 id="cfg-repos">Create some repos</h3> <p>Create a bare repository:</p> - <p><code>$ sudo -u git git init --bare /var/lib/cgit/example</code></p> + <code>$ sudo -u git git init --bare /var/lib/cgit/example</code> <p>Push to it from your local machine:</p> <pre><code>$ git remote add origin git@git.my.tld:example $ git push -u origin main</code></pre> <h3 id="cfg-cgitrc">cgitrc</h3> - <p>A clean default /etc/cgitrc file might look like this:</p> + <p>A clean default <code class="path">/etc/cgitrc</code> file might look like this:</p> <pre><code>css=/cgit.css logo= virtual-root=/ |
