Sensitive Tokens
This script requires working JIRA and GitHub API keys to function properly.
Creating API Keys¶
Before storing credentials, make sure you have created the necessary API keys with the minimum required access.
Storing the Credentials¶
The script uses the dotenv Python library to fetch credentials stored in a .env file. Alternatively, you can store these credentials directly in environment variables.
Using a .env File¶
- Create a
.envfile in theDependAssistdirectory. - Save the following content inside the file with your valid credentials:
JIRA_APIKEY=your_jira_api_key_here
JIRA_USERNAME=your_jira_username_here
GITHUB_TOKEN=your_github_token_here
Saving Credentials in Environment Variables¶
You can also set the credentials directly in your environment variables. Here’s how you can do it:
On Linux/macOS¶
Add the following lines to your .bashrc, .zshrc, or equivalent shell configuration file:
export JIRA_APIKEY=your_jira_api_key_here
export JIRA_USERNAME=your_jira_username_here
export GITHUB_TOKEN=your_github_token_here
After adding the lines, reload the shell configuration:
source ~/.bashrc # or source ~/.zshrc
On Windows¶
Use the following commands in Command Prompt to set environment variables:
setx JIRA_APIKEY "your_jira_api_key_here"
setx JIRA_USERNAME "your_jira_username_here"
setx GITHUB_TOKEN "your_github_token_here"
You will need to restart your Command Prompt or computer for the changes to take effect.
By following these steps, you can securely store and access your credentials, ensuring that the DependAssist script can authenticate with JIRA and GitHub APIs.