Docs
CLI

Login and Git setup

Login methods, automatic SSH key, commit signing and HTTPS login setup, checking with co doctor

When you log in with co, it also prepares git on this computer to clone, push and sign commits for CollabOps repositories. The order is: log in, Git setup (y), and co doctor if something does not work.

Log in

co auth login

On your first login, co asks Where is your CollabOps?. Choose CollabOps Cloud (collabops.ai) for collabops.ai, or Self-hosted (company network) for a CollabOps installed at your company and enter its address. Once chosen, co does not ask again. co auth login --host <address> switches the current login to that address, so to move between two servers use the profiles in Environments and settings.

Then choose a login method.

MethodWhenCommand
BrowserSocial accounts such as Google or Apple, SSO, or no passwordco auth login --web
Email + passwordAccounts that signed up with an emailco auth login --identifier you@example.com
TokenRemote servers without a browser, CIco auth login --token - (pass the token on standard input)

Browser login opens the CollabOps CLI login page in your browser. Approve there, and the login finishes back in the terminal.

Browser login must be finished in a browser on the computer that runs co. It does not finish on a remote server you reached over SSH, so use a token there.

On your first login, choose a default workspace. co then offers Git setup.

Git setup

After login, co lists what it will change and asks Proceed? (y/N). Type y to go ahead. Pressing Enter changes nothing. If you skipped it, run co auth login again and it asks the same question. If everything is already set up, it does not ask.

ItemWhat it does
SSH keyUses a key in ~/.ssh that is already registered to this account, or creates ~/.ssh/collabops_<host>_<user>
Server registrationRegisters the public key for access and for commit signing. The private key stays on this computer
git configWrites user.name, user.email and commit signing to a file that applies only to CollabOps repositories (~/.config/collabops/). Global values you already have are kept. In ~/.gitconfig it adds a line that loads that file and an HTTPS login line, and at the top of ~/.ssh/config it adds one Include line that loads the SSH key settings

The git settings of other repositories do not change. co doctor and co repo clone offer the same setup. A token login does not ask about Git setup, so run co doctor next.

If you log in on a computer without git, co prints Skipping Git setup: git not found and finishes only the login. Install git as described in "When git is missing" below, then (on Windows, in a new terminal window) run co auth login again. Running co doctor again also offers the same Git setup.

Troubleshooting

co auth status         # which address and which account you are logged in to
co doctor              # whether this computer is ready to clone and push
✔ git        git version 2.39.5
✔ ssh        /usr/bin/ssh
! git-lfs    not installed — needed only for repositories that use Git LFS
  → install from https://git-lfs.com, then run git lfs install
✔ login      alice @ https://collabops.ai
! git setup  SSH key, signing or HTTPS helper not set up for https://collabops.ai
  → co auth login

✔ means passed, ! a warning (fix it as hinted; it does not affect the exit code), ✖ a failure, and - a check that runs after the item above it is fixed. co doctor checks the following.

ItemWhat it checksIf there is a problem
gitInstalled, version 2.36 or laterIf missing, shows the install command for your OS and installs it when you answer y. If too old, shows how to upgrade
sshPath of the ssh that git actually uses (also shows ssh-keygen if it is in a different folder)If missing, shows how to install it for your OS. Warns if GIT_SSH or similar points to another program such as PuTTY (plink)
git-lfsInstalled (needed only for repositories that use LFS)Points to git-lfs.com
loginWhether the login is validPoints to co auth login
git setupSSH key, commit signing, HTTPS loginOpens the Git setup above

If git is missing, ssh and git-lfs are checked after git is installed, and git setup is checked only when both git and login are OK. When git is missing or you are not logged in, co doctor exits with a non-zero code, so you can use it as a pre-check like co doctor && co repo clone <repository>.

When git is missing

co doctor shows the install command for your OS and asks Run these commands now? (y/N). It runs only when you type y. When it is not running in a terminal, or output goes to a file or pipe, it prints the commands without asking.

OSInstall command
macOSbrew install git (with Homebrew), otherwise xcode-select --install
Windowswinget install --id Git.Git -e --source winget
LinuxWhichever of apt-get, dnf, yum, zypper, pacman or apk is available (with sudo if not root)

If that tool (winget on Windows, a package manager on Linux) is not available, co points to the git-scm.com download page. After installing git, run co auth login again to finish Git setup.

On macOS, xcode-select --install opens an installer window and returns right away. Finish the install in that window, then run co doctor again. On Windows, open a new terminal window after the install so that git is found.

On Windows

When installing Git for Windows, keep the default SSH option (Use bundled OpenSSH). co creates and checks keys with the ssh that git uses.

In Git Bash, co's questions work with the default settings. Only when the pseudo console is turned off (for example MSYS=disable_pcon) can you not answer them, and co auth login fails partway. In that case, prefix the command with winpty (winpty co auth login) or run it from PowerShell.

When Korean text is garbled

co shows Korean when the OS language is Korean. Some terminals garble that Korean text and symbols such as ✔ and ✖.

In Windows PowerShell 5.1, piping co output (co doctor | Select-String git, co issue list | Out-File list.txt) turns characters into ? or the wrong Korean characters. To save output to a file, use redirection such as co issue list > list.txt, which keeps the text intact.

In MobaXterm Bash and Zsh sessions, co output is garbled when it goes straight to the screen. Open a PowerShell or Cmd session in MobaXterm, or add | cat to the end of the command (co doctor | cat).

To use English, run co config set ui.language en. To see a single command in English, prefix it with CO_LANG=en. In PowerShell, $env:CO_LANG = "en" switches to English for that window only.

Log out

co auth logout

This removes the login and the HTTPS token. co also asks whether to remove the SSH key and git settings it created (default N). On a shared computer, remove them all.

SSH and HTTPS

co repo clone uses SSH by default. After Git setup, when you clone or push over HTTPS, git asks co for credentials and co answers, so no password prompt appears.

collabops.aiSelf-hosted
SSHThe key registered at loginSame
HTTPSAt login, co issues a git-only token (90 days) and uses it. From 7 days before expiry, it renews the token automatically when you use gitNot supported. Use SSH

The token can be used only for git access. Automatic renewal works only while your co login is valid, so if the login has expired, run co auth login again.

co auth logout revokes the token. If revoking fails, co shows a warning and the token expires on its own on its expiry date. If you logged in to collabops.ai with co auth login --token, git also uses that token after Git setup (y).

Table of Contents

AI tools

Was this helpful?