How to Install Sourcehut on macOS
Sourcehut is a web-based software development platform that provides code hosting, mailing lists, continuous integration, and more. In this tutorial, we'll learn how to install Sourcehut on macOS.
Prerequisites
Before we proceed, make sure you have the following:
- macOS installed on your machine
- A terminal application (e.g., Terminal.app, iTerm2)
Installation
- Open the terminal application of your choice.
- Install the necessary dependencies:
$ brew install go openssh stunnel
- Set
$GOPATHenvironment variable to a directory where you have write permission:
$ echo "export GOPATH=\${HOME}/go" >> ~/.bash_profile
$ source ~/.bash_profile
- Get the
scdocutility:
$ git clone https://git.sr.ht/~sircmpwn/scdoc
$ cd scdoc
$ make && sudo make install
- Get the
sr.htutility:
$ go get git.sr.ht/~sircmpwn/sr.ht
- Add
${GOPATH}/binto your$PATH:
$ echo "export PATH=\${GOPATH}/bin:\${PATH}" >> ~/.bash_profile
$ source ~/.bash_profile
- Start the
sr.htservice:
$ sr.ht serve
That's it! You should now be able to access the Sourcehut web interface by navigating to http://localhost:5000 in your web browser.
Conclusion
In this tutorial, we learned how to install Sourcehut on macOS. Now you can start using Sourcehut to host your code and collaborate with others. Happy coding!