Instructions on how to install the GitLab's command-line tool gitlab
.
macOS Command Line Tools need to be installed on your local computer.
To install the Command Line Tools run the following command:
xcode-select --install
gitlab
can be obtained via rubygems.
Install the gitlab
cli using the following command:
gem install gitlab --quiet --silent --no-document --user-install
To make the executables, that were installed with the previous command, available the following line will have to be added to the .bash_profile
file:
export PATH="$(ruby -r rubygems -e 'puts Gem.user_dir')/bin:${PATH}"
Alternatively, you can install the executables to an existing bin
folder already included in the PATH
environment variable by using the --bindir </path/to/exisiting/bin_dir>
option.
An example using the .bin
folder in your home directory would be:
gem install gitlab --quiet --silent --no-document --user-install --bindir "${HOME}/.bin"
Run the following command on a terminal window:
gitlab --version