Sharing a Capsule with Secrets

Sharing or Releasing a Capsule with Secrets

You can share a Capsule with secrets, just like any other Capsule. However, for reproducibility purposes, it is currently not possible to release a capsule with secrets.

A warning message will pop-up when a user tries to release a capsule with secrets.

Running a Shared Capsule with Required Secrets

Run a Shared Capsule with Missing Credentials

If you try to execute a reproducible run in a capsule that requires secrets and the secrets are not set, a warning message will pop up.

Code Ocean allows you to execute a reproducible run anyway. However, if you don't fix the credentials, the results are likely not reproducible.

Check if Secrets are Required

When using other people's capsules, it is a good habit to check if the capsule requires secrets.

  1. Click on environment to display the environment editor.

  2. Scroll down to see the Secrets section.

  3. Check if there is a secret to fill.

The screenshot demonstrates a capsule that requires AWS credentials and a custom key:

Add Your Secret to a Shared Capsule

  • Click on the drop-down menu to select the secret to attach from your account.

  • The list in the drop-down is filtered and only shows the specific type of secret in your account.

  • If you don't have existing credentials to attach, the + Add New [secret type] button allows you to add a new secret:

    • The system will pop up a form for you to fill out the details depending on the secret type.

The system will store the newly added secret to your account.