


Now, navigate to the temp folder, install the repository for GitLab, and then install GitLab itself: For now, we won’t be setting up email integration, so any choice is fine. (for the postfix setup – I think internet site is what you want (it will want to send messages out), which we may set up later. Sudo apt install ca-certificates curl openssh-server postfix Next, we will install GitLab (instructions copied from here) This should output a successful git setup. Once that is done, you can test whether git works: Since this user has neither a password not a shell, they can’t log in directly, even with a key. Then exit the git user’s shell and lock them out by setting their shell to the git shell. Again, not needed for GitLab, but needed to use git directly, as I mentioned above. Touch ~/.ssh/authorized_keys & chmod 600 ~/.ssh/authorized_keysĬopy your public key into the authorized_keys file. We won’t be using it, however, since we’ll use GitLab, which communicates over http. Next we set up the Git user – this user is used to commit files and will not have a shell or password, and will use authorized keys to send work to the server. Which git-shell (this will tell you the path to the Git shell)Īdd /usr/bin/git-shell (or the output of the which command) to it. Now we set up the git user for the server Sudo apt install git (likely already installed) Sudo apt upgrade (upgrade to latest packages) Once you have it, log in as an unprivileged user and set up Git (taken from here and here), using the following commands: First Steps: The Git basic setupįirst, get your hands on a Linux server. I’ll be installing it on a Ubuntu server. I am going to use Git with GitLab as a UI over it. The starting point with any development environment is source control. Installing Git and GitLab on a Linux ServerĪs I said in my previous post, I am building a development environment.
