Git

How to Upgrade Gitea

How to Upgrade Gitea

Updating gitea is a simple as replacing the binary in /usr/local/bin/gitea.

  1. Stop the gitea service

$ sudo systemctl stop gitea

  1. Move the current binary from gitea to gitea.old just in case things break.

$ sudo mv /usr/local/bin/gitea /usr/local/bin/gitea.old

  1. Use wget to get the the current version: example -> https://github.com/go-gitea/gitea/releases/download/v1.20.2/gitea-1.20.2-linux-amd64. This is not the latest version, this is just an example.

cd ~/Downloads && wget https://github.com/go-gitea/gitea/releases/download/v1.20.2/gitea-1.20.2-linux-amd64

  1. Change the name of the file from gitean-x.x.x-linux-amd to gitea

$ mv gitea-x.x.x-linux-amd gitea

Gitea Setup and Install on Ubuntu 20.04 and Others

Gitea Setup and Install on Ubuntu 20.04 and Others

A descriptive caption

After an exhaustive exercise of finger tapping on my keyboard and several attempts to clear my head by walking away from the computer, I have finally setup a Gitea instance. Following the how-tos online seemed simple enough. Follow the steps, install a user, setup permissions, download a file and bam you are good to go. But that is the furthest from the truth for my experience. I have followed what seemed to be ten different how-tos that somehow seem to differ even between the same distro install. Each of which if you were setting up a server on your local machine would work but in my case of setting it up on my Linode instance where you have no access to the GUI and or a web interface that is able to look at the localhost or 127.0.0.1 it was just was nigh impossible. The logs showed I was reaching the server every time but still nothing showed up. But I digress.

Custom Git Commit Push Alias

Custom Git Commit Push Alias

I normally don’t create nor use tons of aliases in my .bashrc file. I have a few that tweak how grep and ls show color in the prompt and others where I can change directory by typing .. or … which perform cd ../ and cd ../../ respectively, but because of my roaming nature, where I bounce around from one computer/server to another where it may or may not have a configured .bashrc nor .vimrc, I have always tried to keep my dot-config-files mostly vanilla. My bashrc can be found here: github.com/wretchedghost/bashconfig I am also of the mind that aliases can make you dumb since you will be relying on the alias you created and not on what the alias might be doing in the background, but I digress.

Git Init Pull

Git Init Pull

Creating a new git repo is a little more involved than one that is already setup but here are the simple steps to get one rolling. I prefer to use SSH over HTTPS due to security and ease of use from the command line.

Setup

We need to first do a few things to make a commit as easy as possible.

  1. Create a ssh key if you haven’t already. This will be placed in ~/.ssh unless you tell it otherwise with the -f flag.