Adding access tokens

nRF Util

tags
nRF Util

When adding custom indexes, you can also add access tokens to the configuration settings. You will need to provide such tokens to be able to read the contents of package indexes with restricted access and download bundles from them.

You can use the following options to manage access tokens:

  • --keychain-entry-name - Use to provide the name of the entry on the OS keychain that stores the token for accessing the key management service.
  • --environment-variable-name - Use to provide the name of the environment variable that stores the token for accessing the key management service. The name of the environment variable is stored and used to access the secret during operations that interact with the relevant index. The environment variable does not need to be set when adding a custom index, but it needs to be set when running the command that interacts with the index.
  • --secret-command <COMMAND> - Use to provide a command that is used to retrieve the secret. These should not be enclosed in quotes or escape. They must also be provided as the last argument to the command.

For example:

nrfutil sdk-manager config sdk-index add lcs2 file://Users/random_user/sdk-lcs2 --environment-variable-name MY_TOKEN