new gitea tutorial, BEAST

This commit is contained in:
nihilist 2024-11-23 20:46:20 +01:00
parent a13c1965de
commit ff7a433008
26 changed files with 576 additions and 2 deletions

BIN
opsec/gitea-anon/0.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 83 KiB

BIN
opsec/gitea-anon/1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

BIN
opsec/gitea-anon/10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

BIN
opsec/gitea-anon/11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
opsec/gitea-anon/12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

BIN
opsec/gitea-anon/13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 230 KiB

BIN
opsec/gitea-anon/14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

BIN
opsec/gitea-anon/15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
opsec/gitea-anon/16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

BIN
opsec/gitea-anon/17.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

BIN
opsec/gitea-anon/18.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
opsec/gitea-anon/19.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

BIN
opsec/gitea-anon/2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

BIN
opsec/gitea-anon/20.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

BIN
opsec/gitea-anon/21.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

BIN
opsec/gitea-anon/22.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
opsec/gitea-anon/23.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

BIN
opsec/gitea-anon/3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

BIN
opsec/gitea-anon/4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

BIN
opsec/gitea-anon/5.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

BIN
opsec/gitea-anon/6.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

BIN
opsec/gitea-anon/7.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

BIN
opsec/gitea-anon/8.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

BIN
opsec/gitea-anon/9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

575
opsec/gitea-anon/index.html Normal file
View File

@ -0,0 +1,575 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<link rel="shortcut icon" href="../../../../../../assets/img/favicon.png">
<title>Gitea .onion Setup (Anonymous Code Repositories and Collaboration)</title>
<!-- Bootstrap core CSS -->
<link href="../../assets/css/bootstrap.css" rel="stylesheet">
<link href="../../assets/css/xt256.css" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="../../assets/css/main.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Static navbar -->
<div class="navbar navbar-inverse-anon navbar-static-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand-anon" href="\index.html">The Nihilism Blog</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="/about.html">About</a></li>
<li><a href="/blog.html">Categories</a></li>
<li><a href="https://blog.nowhere.moe/donate.html">Donate</a></li>
<li><a href="/contact.html">Contact</a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<!-- +++++ Posts Lists +++++ -->
<!-- +++++ First Post +++++ -->
<div id="anon2">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<a href="../index.html">Previous Page</a></br></br><p><img src="../../assets/img/user.png" width="50px" height="50px"> <ba>nihilist@mainpc - 2024-11-23</ba></p>
<h1>Gitea .onion Setup (Anonymous Code Repositories and Collaboration) </h1>
<img src="0.png" class="imgRz">
<p>In this tutorial we're going to take a look at how you can setup an anonymous gitea instance that is accessible over Tor, in order to be able to collaborate with people on projects, while maintaining everyone's anonymity. </p>
<p><u>Disclaimer:</u> If you are a developer working on projects that aim to reduce governmental control, such as working on privacy-cryptocurrency projects (ie Monero, Haveno, Crypto Mixers, etc), <b>take some time to consider stopping maintaing/contributing to those projects under your public identity</b>, and rather shift to maintaining those projects under an anonymous identity (which is the aim of the following Gitea setup). </p>
<p><b>You never know when your tyrannical government is going to snap and decide to make an example out of you, just like what happened to <a href="https://www.coindesk.com/policy/2024/05/14/tornado-cash-developer-alexey-pertsev-found-guilty-of-money-laundering/">Tornado Cash</a></b>. It is a matter of <a href="../internetsegmentation/index.html">adapting your OPSEC to the intended internet use</a>. Don't paint a target on your back and give any ammunition to the adversary, because they're going to shoot you with everything you give them (your IRL name, what you contributed on the project, taking things you said out of context, etc). <b>Tyrants don't care, even if it they have to step on your freedom of speech</b> (as that's what developing code is) to keep their control over the masses, they will do anything to keep their control intact.</p>
</div>
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /grey -->
<!-- +++++ Second Post +++++ -->
<div id="anon3">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2><b>Why is this relevant ?</b></h2>
<p>First of all, Git is a distributed version control system that tracks versions of files. It is often used to control source code by programmers who are developing software collaboratively. It is especially popular in the FOSS community as it allows anyone to contribute to projects.</p>
<p>The place where you can find the most repositories online is <a href="https://github.com/trending">Github</a>, but the problem is that Github has been purchased by Microsoft.</p>
<img src="2.png" class="imgRz">
<p>Now the problem with trusting a business to host your code repositories that reduces governmental control (such as <a href="https://decrypt.co/107053/it-doesnt-change-anything-says-tornado-cash-code-disappears-github">Tornado Cash</a>) is that those governments can use any company (such as Microsoft in particular) to do their bidding, <b>such as infringing on your freedom of speech, censoring you and deleting your work from the platform.</b></p>
<p>The source code for crypto transaction mixer Tornado Cash has disappeared from Github <b>barely 24 hours after the US Treasury Department added the privacy tool to its sanctions list.</b> Highlighting how Microsoft is a proxy that the US Government uses (more often than you think) to persecute anyone they don't like. </p>
<img src="1.png" class="imgRz">
<p> <b>That is why Github should not be relied on to host any code repository that threaten governmental control</b>, we need an alternative that we can host ourselves, to break free from that governmental control. Which is where Gitea comes in the picture.</p>
<p>Gitea is a painless, self-hosted, all-in-one software development service. It includes Git hosting, code review, team collaboration, package registry, and CI/CD. It is similar to GitHub, Bitbucket and GitLab. The most important part being that it can be self-hosted.</b></p>
<img src="3.png" class="imgRz">
<p>Now let's suppose you setup your potentially sensitive repositories on a clearnet gitea instance (meaning the server can be reached directly by a domain name, to it's public IP address. <b>What is stopping the tyrannical government from ordering the VPS provider to shut down the server ?</b> They know where it is located, what server it is on, so they can order it to be taken down all the same, as they will simply force another business to comply with their demands, and this time it will be the server itself that will be taken down.</p>
</br>
</br>
<h2><u>OPSEC RECOMMENDATIONS:</u></h2>
<p>This is why the gitea instance needs to be setup behind Tor, as a <a href="../torwebsite/index.html">.onion hidden service</a>. Now you have a few options as to where to host the the gitea service. It can be on a <a href="../anonymousremoteserver/index.html">remote VPS that you acquired anonymously</a> (where the cost will be the renting of that VPS, such as 5 euros per month):</p>
<img src="../hiddenservice/1.png" class="imgRz">
<p>Or it can simply be on a server that is running at your own home, at the cost of your own elecricity consumption, and internet connection:</p>
<img src="../hiddenservice/0.png" class="imgRz">
</div>
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /white -->
<div id="anon2">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2><b>Gitea instance Setup</b></h2> </br> </br>
<p>Now that we laid out the justifications for this setup, let's set it up on our server using Docker:</p>
<pre><code class="nim">
[ Datura ] [ /dev/pts/13 ] [/srv]
→ apt install docker.io docker-compose -y ; systemctl enable --now docker
[ Datura ] [ /dev/pts/13 ] [/srv]
→ cd /srv
[ Datura ] [ /dev/pts/13 ] [/srv]
→ mkdir gitea_onion
[ Datura ] [ /dev/pts/13 ] [/srv]
→ cd gitea_onion
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ cat docker-compose.yml
version: "3"
networks:
gitea:
external: false
services:
server:
image: gitea/gitea:latest
container_name: gitea-onion
environment:
- USER_UID=1000
- USER_GID=1000
restart: always
networks:
- gitea
- tor
volumes:
- ./gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "127.0.0.1:3019:3000"
- "127.0.0.1:2222:22"
tor:
image: osminogin/tor-simple
container_name: tor
volumes:
- ./tor-data:/var/lib/tor
- ./tor-data/torrc:/etc/tor
networks:
- tor
networks:
tor:
gitea:
</pre></code>
<p>Now let's setup a docker Tor daemon and the folder it needs to have, as we'll later need gitea to connect elsewhere through Tor :</p>
<pre><code class="nim">
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ mkdir -p tor-data/torrc
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ vim tor-data/torrc/torrc
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ cat tor-data/torrc/torrc
SOCKSPort 0.0.0.0:9050
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ chown -R 100:65533 tor-data/
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ chmod 700 tor-data
</code></pre>
<p>now before we run the gitea instance, we need to make it reachable via a .onion domain, so let's install tor and generate a .onion domain by following <a href="../torwebsite/index.html">this tutorial</a></a>: </p>
<pre><code class="nim">
[ Datura ] [ /dev/pts/13 ] [/srv/mkp224o]
→ ls /var/lib/tor/onions/daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion
authorized_clients hostname hs_ed25519_public_key hs_ed25519_secret_key
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ cat /etc/tor/torrc | tail -n 5
HiddenServiceDir /var/lib/tor/onions/daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion/
HiddenServicePort 80 127.0.0.1:3019
HiddenServicePort 2222 127.0.0.1:2222
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ systemctl restart tor@default
</code></pre>
<p>Now that's done, we launch gitea by using docker-compose:</p>
<pre><code class="nim">
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ docker-compose up
Creating gitea-onion ... done
Attaching to gitea-onion
gitea-onion | Generating /data/ssh/ssh_host_ed25519_key...
gitea-onion | Generating /data/ssh/ssh_host_rsa_key...
gitea-onion | Generating /data/ssh/ssh_host_ecdsa_key...
gitea-onion | Server listening on :: port 22.
gitea-onion | Server listening on 0.0.0.0 port 22.
gitea-onion | 2024/11/23 16:37:01 cmd/web.go:242:runWeb() [I] Starting Gitea on PID: 15
gitea-onion | 2024/11/23 16:37:01 cmd/web.go:111:showWebStartupMessage() [I] Gitea version: 1.22.3 built with GNU Make 4.4.1, go1.22.8 : bindata, timetzdata, sqlite, sqlite_unlock_notify
gitea-onion | 2024/11/23 16:37:01 cmd/web.go:112:showWebStartupMessage() [I] * RunMode: prod
gitea-onion | 2024/11/23 16:37:01 cmd/web.go:113:showWebStartupMessage() [I] * AppPath: /usr/local/bin/gitea
gitea-onion | 2024/11/23 16:37:01 cmd/web.go:114:showWebStartupMessage() [I] * WorkPath: /data/gitea
gitea-onion | 2024/11/23 16:37:01 cmd/web.go:115:showWebStartupMessage() [I] * CustomPath: /data/gitea
gitea-onion | 2024/11/23 16:37:01 cmd/web.go:116:showWebStartupMessage() [I] * ConfigFile: /data/gitea/conf/app.ini
gitea-onion | 2024/11/23 16:37:01 cmd/web.go:117:showWebStartupMessage() [I] Prepare to run install page
gitea-onion | 2024/11/23 16:37:01 cmd/web.go:304:listen() [I] Listen: http://0.0.0.0:3000
gitea-onion | 2024/11/23 16:37:01 cmd/web.go:308:listen() [I] AppURL(ROOT_URL): http://localhost:3000/
gitea-onion | 2024/11/23 16:37:01 ...s/graceful/server.go:50:NewServer() [I] Starting new Web server: tcp:0.0.0.0:3000 on PID: 15
</code></pre>
<p>Now that's done, let's access our gitea instance from the tor browser at the .onion domain we set for it, to setup the initial configuration:</p>
<img src="4.png" class="imgRz">
<p>Take note that you can leave everything as it is by default here, except if you want to change the Site Title, take note that there is no need for https in the URL, it is normal for it to remain http. And lastly let's disable registrations, <b>as users won't be using emails to register since we're not going to use the clearnet at all.</b></p>
<img src="5.png" class="imgRz">
<p>Lastly don't forget to create the administrator account at the bottom, and click "Install Gitea":</p>
<img src="6.png" class="imgRz">
<p>Wait a bit for the gitea instance to finish setup, and you're done!</p>
<img src="7.png" class="imgRz">
<p>Now we need to tweak the instance a bit, so let's edit the app.ini file that is located in <b>/srv/gitea_onion/gitea/gitea/conf/app.ini</b>:</p>
<pre><code class="nim">
[ Datura ] [ /dev/pts/6 ] [/srv/gitea_onion]
→ ls
docker-compose.yml gitea
[ Datura ] [ /dev/pts/6 ] [/srv/gitea_onion]
→ cd gitea
[ Datura ] [ /dev/pts/6 ] [/srv/gitea_onion/gitea]
→ ls
git gitea ssh
[ Datura ] [ /dev/pts/6 ] [/srv/gitea_onion/gitea]
→ cd gitea
[ Datura ] [ /dev/pts/6 ] [gitea_onion/gitea/gitea]
→ ls
actions_artifacts attachments conf home jwt packages repo-archive sessions
actions_log avatars gitea.db indexers log queues repo-avatars tmp
[ Datura ] [ /dev/pts/6 ] [gitea_onion/gitea/gitea]
→ cd conf
[ Datura ] [ /dev/pts/6 ] [gitea/gitea/conf]
→ ls
app.ini
[ Datura ] [ /dev/pts/6 ] [gitea/gitea/conf]
→ vim app.ini
</code></pre>
<p>now the first thing i like to do here is to set the default gitea theme to "gitea-dark" by adding the [ui] section at the bottom:</p>
<pre><code class="nim">
[ Datura ] [ /dev/pts/6 ] [gitea/gitea/conf]
→ cat app.ini | tail -n 3
[ui]
DEFAULT_THEME = gitea-dark
</pre></code>
<p>dont forget to restart the gitea docker everytime you edit the app.ini config file:</p>
<pre><code class="nim">
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ docker-compose down ; docker-compose up -d
Stopping gitea-onion ... done
Removing gitea-onion ... done
Removing network gitea_onion_gitea
Creating network "gitea_onion_gitea" with the default driver
Creating gitea-onion ... done
</pre></code>
<p>then on the webpage, hit "Ctrl+F5" to refresh the page and see the new theme:</p>
<img src="8.png" class="imgRz">
</div>
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /white -->
<div id="anon1">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2><b>Gitea mirroring Github repositories through Tor</b></h2> </br> </br>
<p>Now in order to make sure our gitea instance is able to mirror external git repositories from other websites such as github, we need to make sure it goes through Tor to do so, so we need to make sure the gitea container can reach the docker tor daemon, so have to make sure it uses it by adding the [proxy] section in the app.ini config file (<u>Sidenote:</u> the Gitea container will know that the "tor" hostname refers to the tor docker container, so it is totally intentional as written below):</p>
<pre><code class="nim">
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ vim gitea/gitea/conf/app.ini
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ cat gitea/gitea/conf/app.ini | tail -n 4
[proxy]
PROXY_ENABLED = true
PROXY_URL = <b>socks://tor:9050/</b>
PROXY_HOSTS = *
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ docker-compose down ; docker-compose up -d
</pre></code>
<p>And now from there, we should be able to mirror external repositories on gitea by making the traffic go through Tor aswell. As an example, let's create a git mirror of the official <a href="../monero2024/index.html">Monero</a> repository that currently sits on <a href="https://github.com/monero-project/monero">Github</a>:</p>
<img src="9.png" class="imgRz">
<img src="10.png" class="imgRz">
<img src="11.png" class="imgRz">
<p>Now be aware that it's going to take longer than it usually would to get the repository due to the low bandwidth that Tor has, so be be patient and wait until it finishes:</p>
<img src="12.png" class="imgRz">
<img src="13.png" class="imgRz">
<p>And there you go! you just managed to mirror a github repository while still making sure the connections go through Tor.</p>
</div>
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /white -->
<div id="anon2">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2><b>Handling gitea repositories through Tor</b></h2> </br> </br>
<p>So now let's create our first gitea repository from the web interface:</p>
<img src="14.png" class="imgRz">
<img src="15.png" class="imgRz">
<p>Now that the repository has been created, we need to push our first commit there so let's follow the instructions: </p>
<pre><code class="nim">
[ mainpc ] [ /dev/pts/9 ] [~/Documents]
→ mkdir my-very-cool-repository
[ mainpc ] [ /dev/pts/9 ] [~/Documents]
→ cd my-very-cool-repository
[ mainpc ] [ /dev/pts/9 ] [~/Documents/my-very-cool-repository]
→ touch README.md
[ mainpc ] [ /dev/pts/9 ] [~/Documents/my-very-cool-repository]
→ git init
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /home/nihilist/Documents/my-very-cool-repository/.git/
[ mainpc ] [ /dev/pts/9 ] [~/Documents/my-very-cool-repository]
→ git checkout -b main
Switched to a new branch 'main'
[ mainpc ] [ /dev/pts/9 ] [~/Documents/my-very-cool-repository]
→ git add README.md
[ mainpc ] [ /dev/pts/9 ] [~/Documents/my-very-cool-repository]
→ git commit -m "first commit"
[main (root-commit) b090f42] first commit
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 README.md
</code></pre>
<p>Then we can proceed with the rest of the instructions to push the commit to the repository via the .onion gitea domain, with the exception of the <b>git push</b> command, where we need to use the <b>torsocks</b> in front of it, because otherwise it won't be able to resolve the .onion domain:</p>
<pre><code class="nim">
[ mainpc ] [ /dev/pts/9 ] [~/Documents/my-very-cool-repository]
→ git remote add origin http://daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion/nihilist/my-very-cool-repository.git
[ mainpc ] [ /dev/pts/9 ] [~/Documents/my-very-cool-repository]
<b>torsocks git push -u origin main</b>
Username for 'http://daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion': nihilist
Password for 'http://nihilist@daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion':
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Writing objects: 100% (3/3), 212 bytes | 16.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
remote: . Processing 1 references
remote: Processed 1 references in total
To http://daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion/nihilist/my-very-cool-repository.git
* [new branch] main -> main
branch 'main' set up to track 'origin/main'.
</code></pre>
<p>And that's it! You managed to do your first git commit via Tor !</p>
<img src="16.png" class="imgRz">
<p><u>Sidenote:</u> in the same way you also need to use torsocks to git clone repositories that are on .onion domains:</p>
<pre><code class="nim">
[ mainpc ] [ /dev/pts/9 ] [~/Documents]
→ torsocks git clone http://daturab6drmkhyeia4ch5gvfc2f3wgo6bhjrv3pz6n7kxmvoznlkq4yd.onion/nihilist/my-very-cool-repository
Cloning into 'my-very-cool-repository'...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (3/3), done.
</pre></code>
<p>Next, if you want other people to contribute to your gitea projects, you'll have to do manual registrations as they can't use email to register new accounts:</p>
<img src="20.png" class="imgRz">
<img src="21.png" class="imgRz">
<img src="22.png" class="imgRz">
<img src="23.png" class="imgRz">
<p>Once created, simply send the credentials to login to the user that needs them in a private chat (see our recommendation to use <a href="../anonsimplex/index.html">SimpleX chat</a>).</p>
</div>
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /white -->
<div id="anon1">
<div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2">
<h2><b>BONUS: Customizing Gitea's appearance</b></h2> </br> </br>
<p>Now if you want to customize your gitea instance like i did at <a href="https://git.nowhere.moe">https://git.nowhere.moe</a> you'll can first create the templates folder to change the homepage:</p>
<pre><code class="nim">
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ cd gitea/gitea
[ Datura ] [ /dev/pts/13 ] [gitea_onion/gitea/gitea]
→ mkdir templates
[ Datura ] [ /dev/pts/13 ] [gitea_onion/gitea/gitea]
→ cd templates
[ Datura ] [ /dev/pts/13 ] [gitea/gitea/templates]
→ vim home.tmpl
[ Datura ] [ /dev/pts/13 ] [gitea/gitea/templates]
→ cat home.tmpl | grep pain
<h2>A painful, self-inflicted Nightmare </h2>
[ Datura ] [ /dev/pts/13 ] [gitea/gitea/templates]
→ cd /srv/gitea_onion
[ Datura ] [ /dev/pts/13 ] [/srv/gitea_onion]
→ docker-compose down ; docker-compose up -d
</code></pre>
<img src="17.png" class="imgRz">
<p>then to change the logo you can drop your own custom logos in the <b>/srv/gitea_onion/gitea/gitea/public/assets/img/</b> directory:</p>
<pre><code class="nim">
[ Datura ] [ /dev/pts/6 ] [gitea_onion/gitea/gitea]
→ mkdir public/assets/img
[ Datura ] [ /dev/pts/6 ] [gitea_onion/gitea/gitea]
→ cd public/assets/img
[ Datura ] [ /dev/pts/6 ] [public/assets/img]
→ ls
apple-touch-icon.png favicon.png gitea-192.png gitea-lg.png gitea-sm.png img.tar
favicon.ico favicon.svg gitea-512.png gitea-safari.svg gitea.svg logo.svg
[ Datura ] [ /dev/pts/6 ] [public/assets/img]
→ cd /srv/gitea_onion
[ Datura ] [ /dev/pts/6 ] [/srv/gitea_onion]
→ docker-compose down ; docker-compose up -d
</code></pre>
<p>Then, simply refresh the page to see the changes:</p>
<img src="18.png" class="imgRz">
<p>Next, if you want a custom CSS theme like the one i have, <b>first be aware that as gitea continues to be updated, the CSS theme may break depending on the breaking changes that gitea introduces, it is safer to keep using the default gitea-dark theme.</b> If that's not a problem for you, you can download it from <a href="https://git.nowhere.moe/nihilist/Datura-Network/raw/branch/main/2-Decentralization/gitea/gitea/gitea/public/assets/css/theme-space.css">here</a> and put it in the <b>/srv/gitea_onion/gitea/gitea/public/assets/css/</b> directory:</p>
<pre><code class="nim">
[ Datura ] [ /dev/pts/6 ] [/srv/gitea_onion]
→ cd gitea/gitea/public/assets
[ Datura ] [ /dev/pts/6 ] [gitea/public/assets]
→ mkdir css
[ Datura ] [ /dev/pts/6 ] [gitea/public/assets]
→ cd css
[ Datura ] [ /dev/pts/6 ] [public/assets/css]
→ wget https://git.nowhere.moe/nihilist/Datura-Network/raw/branch/main/2-Decentralization/gitea/gitea/gitea/public/assets/css/theme-space.css
--2024-11-23 20:25:50-- https://git.nowhere.moe/nihilist/Datura-Network/raw/branch/main/2-Decentralization/gitea/gitea/gitea/public/assets/css/theme-space.css
Resolving git.nowhere.moe (git.nowhere.moe)... 65.109.30.253
Connecting to git.nowhere.moe (git.nowhere.moe)|65.109.30.253|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 22754 (22K) [text/plain]
Saving to: theme-space.css
theme-space.css 100%[=================================================>] 22.22K --.-KB/s in 0s
2024-11-23 20:25:50 (310 MB/s) - theme-space.css saved [22754/22754]
</code></pre>
<p>Then make sure this is the default theme that is used, from the app.ini config file, and restart the gitea instance to refresh the configuration:</p>
<pre><code class="nim">
[ Datura ] [ /dev/pts/6 ] [public/assets/css]
→ cd ../../../
[ Datura ] [ /dev/pts/6 ] [gitea_onion/gitea/gitea]
→ cd conf
[ Datura ] [ /dev/pts/6 ] [gitea/gitea/conf]
→ ls
app.ini
[ Datura ] [ /dev/pts/6 ] [gitea/gitea/conf]
→ vim app.ini
[ Datura ] [ /dev/pts/6 ] [gitea/gitea/conf]
→ cat app.ini | tail -n 9
<b>[ui]
DEFAULT_THEME = space
THEMES = space, gitea-dark</b>
[ Datura ] [ /dev/pts/6 ] [gitea/gitea/conf]
→ cd ../../..
[ Datura ] [ /dev/pts/6 ] [/srv/gitea_onion]
→ docker-compose down ; docker-compose up -d
</pre></code>
<img src="19.png" class="imgRz">
<p>And that's it! You managed to get a customized .onion-only gitea instance, effectively forcing whoever that wants to use it to remain anonymous, if they want to deanonymize themselves, it will be out of their own accord later on.</p>
</div>
</div><!-- /row -->
</div> <!-- /container -->
</div><!-- /white -->
<!-- +++++ Footer Section +++++ -->
<div id="anonb">
<div class="container">
<div class="row">
<div class="col-lg-4">
<h4>Nihilism</h4>
<p>
Until there is Nothing left.</p></br></br><p>Creative Commons Zero: <a href="../../../../opsec/runtheblog/index.html">No Rights Reserved</a></br><img src="\CC0.png">
</p>
</div><!-- /col-lg-4 -->
<div class="col-lg-4">
<h4>My Links</h4>
<p>
<a target="_blank" rel="noopener noreferrer" href="http://blog.nowhere.moe/rss/feed.xml">RSS Feed</a><br/><a target="_blank" rel="noopener noreferrer" href="https://simplex.chat/contact#/?v=2-7&smp=smp%3A%2F%2FL5jrGV2L_Bb20Oj0aE4Gn-m5AHet9XdpYDotiqpcpGc%3D%40nowhere.moe%2FH4g7zPbitSLV5tDQ51Yz-R6RgOkMEeCc%23%2F%3Fv%3D1-3%26dh%3DMCowBQYDK2VuAyEAkts5T5AMxHGrZCCg12aeKxWcpXaxbB_XqjrXmcFYlDQ%253D&data=%7B%22type%22%3A%22group%22%2C%22groupLinkId%22%3A%22c3Y-iDaoDCFm6RhptSDOaw%3D%3D%22%7D">SimpleX Chat</a><br/>
</p>
</div><!-- /col-lg-4 -->
<div class="col-lg-4">
<h4>About nihilist</h4>
<p style="word-wrap: break-word;"><u>Donate XMR:</u> 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8</p></br><p><u>Contact:</u> nihilist@contact.nowhere.moe (<a href="https://nowhere.moe/nihilist.pubkey">PGP</a>)</p>
</div><!-- /col-lg-4 -->
</div>
</div>
</div>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
</body>
</html>

View File

@ -238,8 +238,7 @@
<!--<li><a href="hiddenservices/index.html">✅ Introduction to Hosting Hidden Services</a></li>--> <!--<li><a href="hiddenservices/index.html">✅ Introduction to Hosting Hidden Services</a></li>-->
<li><a href="hiddenservice/index.html">✅ Where to host Anonymous Hidden Services ?</a></li> <li><a href="hiddenservice/index.html">✅ Where to host Anonymous Hidden Services ?</a></li>
<li><a href="torwebsite/index.html">✅ Hidden Service with custom .onion Vanity V3 address</a></li> <li><a href="torwebsite/index.html">✅ Hidden Service with custom .onion Vanity V3 address</a></li>
<li><a href="https://git.nowhere.moe/nihilist/blog-contributions/issues/21">❌ Minimalistic MoneroSSO .onion setup</a></li> <li><a href="gitea-anon/index.html">✅ Gitea .onion Setup (Anonymous Code Repositories and Collaboration)</a></li>
<li><a href="https://git.nowhere.moe/nihilist/blog-contributions/issues/22">❌ Gitea .onion setup (Code repositories)</a></li>
<li><a href="https://git.nowhere.moe/nihilist/blog-contributions/issues/47">❌ How to setup Nerostr (Nostr blogging)</a></li> <li><a href="https://git.nowhere.moe/nihilist/blog-contributions/issues/47">❌ How to setup Nerostr (Nostr blogging)</a></li>
</br> </br>
</ol></br> </ol></br>