GitLab is the number 2 hosting provider for Git repos after GitHub
It has good feature parity with GitHub.com, although less 3rd party CI/CD integrations as everybody integrates to GitHub first .
On Mac using Homebrew:
brew install glab
glab --help
Various GitLab CLI scripts are in HariSekhon/DevOps-Bash-tools repo.
Script to download latest binary from GitLab to /usr/local/bin
or $HOME/bin
:
git clone https://github.com/HariSekhon/DevOps-Bash-tools bash-tools
cd bash-tools
install/install_gitlab_cli.sh
For the glab
CLI above and the gitlab_api.sh
script in the
DevOps-Bash-tools repo, create a Personal Access Token here:
GitLab -> Preferences -> Access Tokens
The add this to your shell / Bash profile:
export GITLAB_TOKEN=...
Gitlab CLI config can be found here:
~/.config/glab-cli/config.yml
Create a .gitlab-ci.yml
into the root directory of your git repo, then git push
to GitLab.
Template to get you started: