33 lines
897 B
Markdown
33 lines
897 B
Markdown
# dbis_docs
|
|
|
|
## Environment Setup
|
|
|
|
This repository uses a `.env` file for configuration, including GitHub authentication.
|
|
|
|
### Loading Environment Variables
|
|
|
|
To load environment variables from `.env`:
|
|
|
|
```bash
|
|
source load_env.sh
|
|
```
|
|
|
|
This will export `GITHUB_TOKEN` and other variables from `.env` to your current shell session.
|
|
|
|
### Using GITHUB_TOKEN
|
|
|
|
The `GITHUB_TOKEN` can be used for:
|
|
|
|
1. **GitHub API calls**: Export it and use in scripts or API requests
|
|
```bash
|
|
source load_env.sh
|
|
curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user
|
|
```
|
|
|
|
2. **Git HTTPS authentication** (if needed): Configure git to use the token:
|
|
```bash
|
|
git config credential.helper "$(pwd)/git-credential-helper.sh"
|
|
```
|
|
|
|
**Note**: This repository is currently configured to use SSH authentication (recommended). The token is available for other GitHub API operations if needed.
|