Skip to main content

Secrets

warning

Note that Option 1 and Option 2 are only possible for Cognaize employees and contributors to the library.

All secrets are securely stored within an encrypted .env file using git-crypt. To gain access to these secrets for development and contribution purposes, you have the following options:

Option 1: Using git-crypt with Your Own Key

  1. Install git-crypt:
    You'll need to install git-crypt on your system. Follow the installation instructions available in the official documentation.

  2. Generate and Publish a GPG Key:

    • Generate a GPG key if you don’t have one, by running:
      gpg --gen-key
    • Publish your GPG public key to a keyserver:
      gpg --send-keys [Your-Key-ID]
  3. Request Access:
    Email vahe@andonians.com with your GPG key ID and request your key to be added.

Option 2: Using a Shared Keyfile

  1. Request the Keyfile:
    Contact vahe@andonians.com and ask for the git-crypt keyfile.

  2. Clone the Repository:
    Clone the cognaize repository.

  3. Unlock the Secrets:
    Navigate to the cloned repository and use the provided keyfile to unlock the .env file using:

    git-crypt unlock [path-to-keyfile]

Option 3: Create Your Own .env File

  1. Create .env:
    In the root of your local clone of the repository, create a file named .env.

  2. Add Entries:
    Add the necessary entries with your credentials or API keys to the .env file.

    OPENAI_API_KEY=your-api-key
    OPENAI_ORGANIZATION=your-organization-id
  3. Save and Use:
    Save the .env file. The application should now be able to read the necessary secrets for development.


Notes:

Automatic Encryption/Decryption: Due to the configuration in the .gitattributes file, git will automatically encrypt and decrypt the .env file when you push to or pull from the Git repository, as long as git-crypt is installed and set up on your system.