Installing Gitlab on Debian Linux
Table of contents
- Git/Git server
- GitLab installation
- Git for Windows
- Generating SSH Keys
- Adding SSH keys to GitLab account
- Setup GitLab in Atom
Git/Git server
To manage my network configuration files in a better way, I’m trying out to handle those in a git repository.
A git repository is also useful for Python or other scripts I’m using for network automation.
The reason to use git is because versioning of configuration files and writing Python scripts is becoming more and more relevant for network engineers and those technologies also part of the Cisco’s DevNet Associate Exam.
GitLab installation
As git software, I’m using GitLab and following their installation instructions for GitLab Official Linux package Debian.
The manual and installation instructions are straight-forward and the setup can be easily accomplished with some basic Linux knowledge.
Git for Windows
For a Microsoft Windows 10 laptop, I’m installing the package provided at Git for Windows, which brings the required tools like git bash, shell integration and a git GUI to a windows system.
Generating SSH Keys
For generating SSH keys, I’m using the puTTY package. I’m creating the SSH keys for the GitLab server with the command ssh-keygen as shown below.
C:\Users\xxxxxx>ssh-keygen -t ed25519 -C "xxxxxxxxxxxxx"
Generating public/private ed25519 key pair.
Enter file in which to save the key (C:\Users\xxxxxx/.ssh/id_ed25519):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in C:\Users\xxxxxx/.ssh/id_ed25519.
Your public key has been saved in C:\Users\xxxxxx/.ssh/id_ed25519.pub.
The key fingerprint is:
SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxx
The key's randomart image is:
+--[ED25519 256]--+
xxxxxxxxxxxxxxxxxxx
+----[SHA256]-----+
Adding SSH keys to GitLab account
After the generation I’m adding my public SSH key to my account on the Gitlab server like shown in the screenshot (Account > Settings > SSH Keys).
Setup GitLab in Atom
For the Atom editor I’m using the plug-in git-plus to connect to my GitLab server. In the plug-in settings, I’m just adding the path to the git executable.
C:\Program Files\Git\bin\git.exe
A git repository then can be easily accessed in Atom by using GitLab’s Clone with SSH function.