Secrets
Secrets are a secure and reusable way to add credentials and other sensitive information to your workspace. You can use secrets to store sensitive data, such as passwords, API keys, and tokens, and then reference them in your deployments, jobs, and pods.
Secrets are similar as environment variables, but the actual value is no longer editable or revealable once created.
Managing Secrets
Navigate to the Secrets tab on the left-hand side of the workspace settings page. You will see a list of all the secrets you have created. You can add, edit, or delete secrets from this page.

We provide quick ways to add Github, Hugging Face, OpenAI tokens and NGC API keys as secrets to your workspace. All the secrets are stored and associated with the workspace in which they are created.
Visibility
For every secret, you can set the visibility to Public or Private.
- Public: The secret is visible to all users in the workspace.
- Private: The secret is only visible to you, the user who created it.
By default, all secrets are created as private.
Using Secrets
On dashboard, you can add secrets as environment variables to your deployments, jobs, and pods. They are configurable under advanced settings while creating or editing a deployment, job, or pod.
To access the secret value in the deployment, you can use the os
module:
import os
my_secret_value = os.environ['MY_SECRET']
my_optional_secret_value = os.environ.get('MY_OPTIONAL_SECRET', 'default_value')