GitHub, BitBucket, GitLab; they are not the only solutions available to share Git repos with your friends and colleagues. I’ve been playing with Gitea recently, and it’s a really cool alternative, written in Go. Here’s a quick way to test it.
Install
You can run the binary or the container, of course, but it’s also very easy to install Gitea in Minikube:
$ minikube start --addons=ingress
$ helm repo add gitea-charts https://dl.gitea.io/charts/
$ helm install gitea gitea-charts/gitea
Create and apply a quick ingress for it:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gitea-ingress
labels:
app: gitea-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
kubernetes.io/ingress.class: nginx
spec:
rules:
- http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: gitea-http
port:
number: 3000
After install, proceed as follows:
- Login as
gitea_admin
(see below) and create a new user. - Check the IP of the server using
$ minikube ip
- Edit
/etc/hosts
with the line192.168.49.2 git.example.com
where the IP is the one from above
Here’s the default credentials:
- Username:
gitea_admin
- The default password is in the helm chart:
r8sA8CPHD9!bt6d
One can also configure Gitea to use LDAP and other authentication mechanisms.
Maybe the biggest drawback of Gitea is that it does not feature a built-in CI/CD pipeline mechanims. There are some options listed here, for example Drone, Agola, or Woodpecker.
If you’re into OpenShift, here’s what you need. And here’s a tutorial showing how to use GitOps with Gitea and Argo CD on OpenShift.