# Installing cob-cli
To install the client application, make sure you have the following command-line utilities installed on your computer:
- rsync;
- git
- NodeJs ( >= v16);
In order to install cob-cli
you will need to:
- Generate a pair of public/private keys
- Create a GitLab account
- Install cob-cli
- Register your public key
- Configure ssh connection
# 1. Generate SSH keys
In order to access both the GitLab repository of the CoB server you want to interact with and the server itself, you will need to generate a pair of SSH keys (a public and a private key). You can follow this guide provided by GitLab (opens new window) explaining how to generate an SSH key pair and how to add the public key to your GitLab account.
ssh-keygen -t ed25519
Once completed, you should have two new files in your .ssh
folder:
~/.ssh/id_ed25519 # This is your private key
~/.ssh/id_ed25519.pub # This is your public key
# 2. Create GitLab account
Skip this step if you already have an account and wish to use it.
Go to GitLab.com register page (opens new window) and create your new account.
WARNING
After creating your account, make sure to add the newly generated public key to your GitLab account as well.
TIP
To verify that your configuration is correct, run the command ssh -T [email protected]
.
If everything is set up properly, you should see a message like: Welcome to GitLab, @<your-GitLab-username>!
# 3. Install cob-cli
The cob-cli
tool is primarily designed for Unix-based systems. However, Windows users can seamlessly utilize the tool by leveraging the (Windows Subsystem for Linux WSL Installation Guide (opens new window).
TIP
In WSL, for installing Node.js, we recommend using nvm (opens new window).
sudo apt update
sudo apt -y upgrade
curl https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash
source ~/.nvm/nvm.sh
nvm install 16.20.2 && nvm alias default 16.20.2 && nvm use default
To finalize the installation process, simply execute the following commands in a terminal:
- Run
npm install -g cob-cli
. - Type
cob-cli help
to verify that cob-cli has been installed correctly.
# 4. Register your public key.
To access any <server_name>.cultofbits.com
server, you must request authorization. Please reach out through the appropriate channels and provide the following information:
- Name
- Company
- Public key
- Server name to access
You will be notified once your access is granted, along with the username to use for connecting to the servers.
# 5. Configure SSH connection
Next, you need to configure your SSH connection by editing (or creating, if it doesn’t exist) the file ~/.ssh/config. Add the following lines to the file, ensuring that the indentation on lines 2 to 5 is preserved:
Host *.cultofbits.com
User <your username>
Port 40022
AddKeysToAgent yes
IdentityFile ~/.ssh/id_ed25519
After configuring the ~/.ssh/config file, you should be able to run the following command without needing to provide additional information, other than your private key passphrase if you set one.
ssh <server_name>.cultofbits.com