# Managing Secrets

Test runs may require access to credentials (such as API keys) which you don't want to store in version control.

To make secrets available to you test runs, add them from the TURBO TEST Web UI:

  1. Navigate to the TURBO TEST web UI
  2. Select your repository from the top navigation menu item 'Secrets'
  3. Add necessary secrets for your test suite to access private resources

Typically, Ruby on Rails applications require either an environment variable RAILS_MASTER_KEY or an encrypted credentials file such as ./config/credentials/test.key

Encrypted credentials files are not usually stored in version control. To create a credentials file from a secret created from the TURBO TEST Web UI, add this command to your before_test_run section:

[before_test_run]
commands = '''
cat $RAILS_MASTER_KEY > ./config/credentials/test.key
'''