Tuesday | 05 NOV 2024
[ previous ]
[ next ]

Source Hut

Title:
Date: 2024-01-17
Tags:  

Table of Contents

  1. First repo

sr.ht, also know as source hut, is a code forge specifically for hackers. I wasn't familiar with forges before but it seems to be a popular term for stuff like github. A code forge is a place to have repositories, bug trackers and mailing lists. My only experience with this has been through github and downloading things from sourceforge.

source hut is a project by the prolific Drew DeVault. I have been reading his blogs and can relate to his feelings about software bloat and simplifying things. Which is where I learned about source hut and how it aims to be a full functional code forge without turning into the mess that is the modern software development world.

The reason I'm using source hut today instead of any other day is because the past few days source hut has been under a ddos that has followed them around various hosts. I love the transparency that Drew has shown and how responsive he is to things and felt the need to support him properly. So I finally signed up after following him for so long from the sidelines.

I've currently switched over my ScarletDME git to sr.ht and slowly I'll be moving over more things. I think this is a small part of a larger goal I have for myself of becoming independent from the megacorps that own everything.

First repo

Signing up for sr.ht and becoming a paying member was extremly easy.

Setting up my ssh key was also straightforward.

Generate a new key:

ssh-keygen -f ~/.ssh/srht -N '' -C srkey

Copy the public key and add it to your list of keys at https://meta.sr.ht/keys:

cat ~/.ssh/srht.pub

Once the key is added, you can now push a repo to sr.ht and it will automatically create it if it doesn't already exist. In my case, I want to continue pushing to github and source hut at the same time:

git remote set-url origin --push --add git@git.sr.ht:~nivethan/ScarletDME
git remote set-url origin --push --add git@github.com:Krowemoh/ScarletDME.git

To make sure the remotes are correct:

> git remote -v
origin   git@github.com:Krowemoh/ScarletDME.git (fetch)
origin   git@git.sr.ht:~nivethan/ScarletDME (push)
origin   git@github.com:Krowemoh/ScarletDME.git (push)
upstream   https://github.com/geneb/ScarletDME.git (fetch)
upstream   https://github.com/geneb/ScarletDME.git (push)

I'll need to switch out the fetch as well at some point. For now I'm going to get everything switched over and then I'll go back and remove github.

I then did a git push:

git push origin master

A cool little message:

remote: Resolving deltas: 100% (1187/1187), done.
remote: 
remote:    NOTICE
remote: 
remote:    You have pushed to a repository which did not exist. ~nivethan/ScarletDME
remote:    has been created automatically. You can re-configure or delete this
remote:    repository at the following URL:
remote: 
remote:    https://git.sr.ht/~nivethan/ScarletDME/settings/info
remote: 

By default this was created in private mode, I changed it to public afterwards.