Secrets
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
-
Install
git-crypt:
You'll need to installgit-crypton your system. Follow the installation instructions available in the official documentation. -
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]
- Generate a GPG key if you don’t have one, by running:
-
Request Access:
Email vahe@andonians.com with your GPG key ID and request your key to be added.
Option 2: Using a Shared Keyfile
-
Request the Keyfile:
Contact vahe@andonians.com and ask for thegit-cryptkeyfile. -
Clone the Repository:
Clone the cognaize repository. -
Unlock the Secrets:
Navigate to the cloned repository and use the provided keyfile to unlock the.envfile using:git-crypt unlock [path-to-keyfile]
Option 3: Create Your Own .env File
-
Create
.env:
In the root of your local clone of the repository, create a file named.env. -
Add Entries:
Add the necessary entries with your credentials or API keys to the.envfile.OPENAI_API_KEY=your-api-key
OPENAI_ORGANIZATION=your-organization-id -
Save and Use:
Save the.envfile. 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.