Installing cob-cli
In order to install cob-cli
you will need to:
- Generate a pair of public/private keys
- Create a GitLab account
- Install pre-requisites
- 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 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
WARNING
Password protected keys are currently not supported
2. Create GitLab account
Skip this step if you already have an account and wish to use it.
Go to GitLab.com register page 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 pre-requisites
To fully utilize cob-cli, make sure you have the following command-line utilities installed on your computer:
- rsync;
- git
- NodeJs ( >= v16);
Mac and Linux users should install these dependencies using their preferred package system.
Windows
Although cob-cli
is primarily designed for Unix-based systems, Windows users have two options for running it:
- by leveraging the Windows Subsystem for Linux (check WSL Installation Guide and then follow the Linux instructions): our recommended approach
- by installing windows native versions of
cob-cli
's dependencies: when installing WSL is not possible
install rsync
Windows users can use cwRsync Client, a standalone packaging of rsync and ssh.
- Download the latest zip from itefix.net
- Unzip the downloaded file to an appropriate location (we sugest
C:\Users\<user>\Documents\Apps
) - Add the
bin
sub-directory to yourPATH
, before the entry forC:\Windows\System32\OpenSSH
, so that the included version of ssh is preferred over the one included in Windows.
TIP
To test that rsync is correctly configured run the command rsync -V
. You should get the following output:
rsync version 3.4.1 protocol version 32
Copyright (C) 1996-2025 by Andrew Tridgell, Wayne Davison, and others.
Web site: https://rsync.samba.org/
Capabilities:
64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
socketpairs, symlinks, symtimes, hardlinks, no hardlink-specials,
hardlink-symlinks, IPv6, atimes, batchfiles, inplace, append, no ACLs,
no xattrs, optional secluded-args, iconv, prealloc, stop-at, crtimes
Optimizations:
no SIMD-roll, no asm-roll, openssl-crypto, no asm-MD5
Checksum list:
xxh128 xxh3 xxh64 (xxhash) md5 md4 shal none
Compress list:
zstd 124 zlibx zlib none
Daemon auth list:
sha512 sha256 shal md5 md4
rsync comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it under certain conditions. See the GNU General Public Licence for details.
TIP
To confirm that the correct version of ssh is used, run the command ssh -V
. You should get the following output:
OpenSSH_9.9p2, OpenSSL 3.0.15 3 Sep 2024
The version string should not include any mention of windows
install git
We recommend installing git with WinGet:
winget install --id Git.Git -e --source winget
install Node.js
We recommend installing Node.js versions using NVM for Windows (The Microsoft recommend way).
After nvm
is installed, you can install an appropriate version of node with:
nvm install 16.20.2
4. Install cob-cli
To install cob-cli
, 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.
5. 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.
6. 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.pt
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.pt