In this article I’m going to show you, step by step, how to set up an OSX machine to provide secure access to git repositories over the internet via ssh. This was tested on OSX 10.6.
github provides git repository hosting with a lovely interface. If github isn’t feasible, then this article will help you set up something similar, unfortunately without the nice interface.
I assume that you already have git installed. If not, install the latest version from the git website.
We will be walking through the following steps:
- Give the server a static IP address on the local network
- Set up port forwarding on the router
- Getting dynamic DNS
- Add a user named “git” to the server
- Setting up ssh securely on the client computers
- Setting up ssh securely on the server
- Making a bare git repository
- Using your new git server