After a provider’s credential has been set, it can be used as input in the formula’s **config.json
**file.
To do so, it is necessary to use the reserved keyword: CREDENTIAL
When the credential is used as an input, it will contain 2 fields:
CREDENTIAL_PROVIDER_VARIABLE
For example, to be able to use GITHUB
credentials as input, you need to inform them as follows in the formula’s config.json
file:
"inputs": [
{
"name": "git_user",
"type": "CREDENTIAL_GITHUB_USERNAME"
},
{
"name": "git_email",
"type": "CREDENTIAL_GITHUB_EMAIL"
},
{
"name": "git_token",
"type": "CREDENTIAL_GITHUB_TOKEN"
}
]
If you have any questions regarding the provider’s variable names, you can check the credentials you’ve set using the following command:
rit list credential
With GITHUB
, it will return something like this:
PROVIDER CONTEXT CREDENTIAL
github default {"token":"***", "email":"***", "username":"***"}
For more information about the available automations on our community repository, check out the commands list.
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.