Links

Authorization

How to login to Kyso with the Kyso CLI
Before executing any action using Kyso CLI, an authentication and authorization process must be fulfilled. Kyso offers different ways to authenticate, and facilitates an interactive mode to allow users to do so easily.
To execute the interactive authentication mode just execute kyso login and follow the instructions:
$ kyso login
? What is the url of your kyso installation? https://kyso.io
? Select a provider (Use arrow keys)
❯ Kyso
Access token
Google
Gitlab
We do not support logging in with Bitbucket from the CLI due to a limitation of Bitbucket. Bitbucket only accepts one callback URL to verify a login, which is handled by Kyso's API. If you've created a Kyso account on the UI with Bitbucket, you can create an access token (see below) and use this token to log in from the command line.
We also don't support logging in with Github from the CLI at this time, since Github does not allow us to launch a localhost server to verify login credentials.
First, kyso will ask you for the URL of your Kyso installation. Kyso can run on the cloud or on a private installation. So for that reason, before doing any operation, the Kyso CLI must know where to point. Once that field is fulfilled, a set of authentication systems can be used.
Remember to include the https:// in this field!

Access Token

Create your token

Open your browser, log in with your user and go to your personal settings.
Personal Settings
Click on the "Token" tab on this page.
Access Token
Click on "Generate new Token" button. A new form will appear in your window, asking for the name of your token. Add a descriptive name and click on "Create".
A new token will be created and shown at your screen. Be aware, as this token will not be shown anymore. Copy it in a secure place and open your terminal.
New generated token

Interactive mode

Open your terminal, execute kyso login and select Access token as the provider.
kyso login
? Select a provider (Use arrow keys)
Kyso
❯ Access token
Google
Gitlab
You will be asked for your username and your password, and if they are correct, you will be successfully logged into Kyso.
kyso login
? What is the url of your kyso installation? https://kyso.io
? Select a provider Access token
? What is your email? your_mail@your_domain.io
? What is your access token (Get one from https://dev.kyso.io/settings )?
bfca17ef-ed71-44b8-be95-971ae64aba10
Logged successfully

Explicit mode

Simply run the following command, explicitly stating your deployment URL, login details and access token.
kyso login --kysoInstallUrl https://kyso.io
--provider kyso --username [email protected]
--token bfca17ef-ed71-44b8-be95-971ae64aba10

Username and Password

Interactive mode

Open your terminal, execute kyso login and select Kyso as the provider.
kyso login
? Select a provider (Use arrow keys)
❯ Kyso
Access token
Google
Gitlab

Interactive Mode

You will be asked for your username and your password, and if they are correct, you will be successfully logged into Kyso.
kyso login
? Select a provider Kyso
? What is your username? [email protected]
? What is your password? *******
Logged successfully

Explicit mode

Open your terminal and execute the next command:
kyso login --kysoInstallUrl https://kyso.io
--provider kyso --username [email protected]
--password your_password
Using your password in command line tools is not the most secure practice, especially if you are using it in a CI/CD environment. We strongly recommend using the Access Token alternative instead!

Google

Only available in interactive mode, & does not work when using the client with docker!

Open your terminal, execute kyso login and select Google as your provider.
kyso login
? Select a provider (Use arrow keys)
Kyso
Access token
❯ Google
Gitlab

Gitlab

Only available in interactive mode, does not work when using the client with docker!

Open your terminal, execute kyso login and select Gitlab as your provider.
kyso login
? Select a provider (Use arrow keys)
Kyso
Access token
Google
❯ Gitlab