Create access-token
Overview
To support non-interactive environments, you can generate access tokens to authenticate against the Spawn API.
Command
$ spawnctl create access-token --purpose <Purpose>
Tutorial
In this tutorial we create an access token for the purpose of using the spawnctl
in a CI environment.
As a prerequisite you should've followed the instructions to install spawnctl
Run the following command to create an access token.
$ spawnctl create access-token --purpose "CI system Spawn access token" Access token generated: <access-token-string>
This access token cannot be retrieved after this command. So make sure you store it somewhere safe to retrieve later.
Future
spawnctl
commands can use the access token to avoid requiring the interactive flow provided byspawnctl auth
.$ spawnctl create data-image -f ./development.yaml --accessToken <access-token-string>