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 for, and brings an interactive mode to allow users to do so easily.
To execute the interactive authentication mode just execute kyso-cli login and follow the instructions.
1
$ kyso login
2
? What is the url of your kyso installation? https://kyso.io
3
? Select a provider (Use arrow keys)
4
❯ Kyso
5
Access token
6
Google
7
Github
8
Bitbucket
9
Copied!
First of all, kyso will ask you for the URL of your Kyso installation. Kyso can run as a SaaS, but as an On Premise tool as well. 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.

Username and password

Interactive mode

Open your terminal, execute kyso login and select Kyso as the provider.
1
kyso login
2
? Select a provider (Use arrow keys)
3
❯ Kyso
4
Access token
5
Google
6
Github
7
BitbucketExplicit mode
Copied!
You will be asked for your username and your password, and if they are correct, you will be successfully logged into Kyso.
1
kyso login
2
? Select a provider Kyso
3
? What is your username? [email protected]
4
? What is your password? *******
5
Logged successfully
Copied!

Explicit mode

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

Access Token

Create your token

Open your browser, log in with your user at Kyso and go to your personal settings. Click on the "Token" tab in your personal settings
Token's section in your personal profile
Click on "Generate new Token" button. A new form will appear in your window, asking for the name of your token. Put a descriptive name and click on "Create".
Token creation form
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.
1
kyso login
2
? Select a provider (Use arrow keys)
3
Kyso
4
❯ Access token
5
Google
6
Github
7
BitbucketExplicit mode
Copied!
You will be asked for your username and your password, and if they are correct, you will be successfully logged into Kyso.
1
kyso login
2
? What is the url of your kyso installation? https://kyso.io
3
? Select a provider Access token
4
? What is your email? [email protected]_domain.io
5
? What is your access token (Get one from https://dev.kyso.io/settings )?
6
bfca17ef-ed71-44b8-be95-971ae64aba10
7
Logged successfully
Copied!

Explicit mode

1
kyso login --kysoInstallUrl https://kyso.io
2
--provider kyso --username [email protected]
3
--token bfca17ef-ed71-44b8-be95-971ae64aba10
Copied!

Google

Only available in interactive mode!

Open your terminal, execute kyso login and select Google as your provider.
1
kyso login
2
? Select a provider (Use arrow keys)
3
Kyso
4
Access token
5
❯ Google
6
Github
7
Bitbucket
Copied!

Github

Only available in interactive mode!

Open your terminal, execute kyso login and select Github as your provider.
1
kyso login
2
? Select a provider (Use arrow keys)
3
Kyso
4
Access token
5
Google
6
❯ Github
7
Bitbucket
Copied!

Bitbucket

Only available in interactive mode!

Open your terminal, execute kyso login and select Bitbucket as your provider.
1
kyso login
2
? Select a provider (Use arrow keys)
3
Kyso
4
Access token
5
Google
6
Github
7
❯ Bitbucket
Copied!

Gitlab

Only available in interactive mode!

Open your terminal, execute kyso login and select Bitbucket as your provider.
1
kyso login
2
? Select a provider (Use arrow keys)
3
Kyso
4
Access token
5
Google
6
Github
7
❯ Bitbucket
Copied!