veganism.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
Veganism Social is a welcoming space on the internet for vegans to connect and engage with the broader decentralized social media community.

Administered by:

Server stats:

297
active users

#gitlab

13 posts13 participants0 posts today

@alexanderdyas That's true, but only for (more or less) 'advanced' users.

When you create an empty #GitHub or #GitLab repo, they literally tell you use 'git add .' in their 'Configure the Git repository' tutorial. There is no section how to setup a .gitignore file. Because .gitignore is very project/tech-stack specific.

Why is this even a problem, because the files stay in Git forever. Unless you invest a lot of time. And time = money.

The way Gitlab, Forgejo, Gitea etc. use the server-side SSH server to accept pushed data over SSH relies on a system user called git having SSH access. (or forgejo in their case).

Access is granted by the standard
authorized_keys inside ~/.ssh, which for forgejo means /var/lib/forgejo/.ssh/authorized_keys. When a user adds an SSH key to their account, it's added to this authorized_keys file.

I really hate this, this means that any user of Forgejo is only inches away from having full shell access. The default shell of the
forgejo user is /bin/bash, it exists inside of /etc/passwd:

forgejo:x:122:130:Forgejo (Beyond coding. We forge.):/var/lib/forgejo:/bin/bash
I really really hate this. The only thing preventing random users of Forgejo having shell access is the default command of the SSH session as stipulated by the authorized_keys entry, this is what it looks like:
command="/usr/bin/forgejo --config=/etc/forgejo/app.ini serv key-1",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty,no-user-rc,restrict ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOgnZeNC4fMCXYuWxir7NlKts9Zj4sYZZJzzHh4IyTm2 Baa-New

This is technically
secure, there is no publicly known way of bypassing this and gaining shell access by adding your own SSH key to forge and SSHing into the server as the forgejo user. It will immediately disconnect you, and if you try submitting any specific command you'll receive Disallowed command.

But still, I really really really hate this. We're just one tiny misconfiguration, one minuscule exploit away from granting all forgejo users shell access into the server
:akko_sob:

Imagine for example, you were hosting a Minecraft server on Windows. And to grant a user access to it, you had to create them a Windows User inside
control userpasswords2 and then explicitly disallow them RDP access. That RDP config is the only thing preventing them for remoting straight into your server. This si what it feels like, I can't help but wish SSH was entirely separate from everything else going on here.

Which is exactly what Forgejo's own built-in SSH server does, I'll enable that and move it to a different port, because I'm too scared otherwise, and my server's not even public, and I haven't even started with Runners yet, those scare me even more
:02notlikethis:

Feel free to correct me if I'm wrong, or add your own insights I'd like to know more about this mentality
#ssh #git #forgejo #linux #security #gitlab

Ich weiss, es gibt viele #GitHub und #GitLab Alternativen. Einige kenne ich auch schon. Aber, welche in Deutschland(!) oder auch AT gehosteten Git Alternativen wuerdet ihr empfehlen? Muss nicht unbedingt kostenlos sein, sollte halt nur da gehostet werden.

Gerne boosten/teilen.
:boost_ok:

For the offsite copy, we recommend using a remote service that is compatible with versioning tools such as Git, to ensure seamless integration with versioning tools. Once again, be aware of the risks associated with Microsoft GitHub's terms of service. Your institution may provide a #gitlab instance, also known as a gitlab forge, for storing your files. This option is highly recommended. Remember to download a copy of your files before leaving your institution for a new job.
10/11

*Decentralized source code hosting: we can do better.*

- #Github succeeded in providing us a space to swarm. 😌

- #Gitlab #Forgejo and others gave us sovereignty back over our code hosting. 🤗

.

- @radicle now brings communication back between those independent hosts. 🤯

(Works like the #fediverse 😏)

.

This #git forge is a big step on the path to freeing uncensored project collaboration.

A much needed tool to bulletproof #foss 👊

radicle.xyz/

radicle.xyzRadicleSovereign code infrastructure.