refactor: rename auth.py to gitea_auth.py and ignore env files
This commit is contained in:
@@ -11,12 +11,24 @@ A collection of Python scripts and an MCP server to automate interactions with G
|
||||
|
||||
## Authentication
|
||||
|
||||
Scripts extract credentials from the macOS keychain automatically — no tokens on the command line.
|
||||
Authentication is configured via environment variables or a local `.env` file in the repository root (uses `python-dotenv`).
|
||||
|
||||
- **dadeschools** — HTTPS via `git credential fill` (SSH:2222 is flaky)
|
||||
- **prgs** — SSH via `ssh://git@gitea-ssh.prgs.cc:2222` (SSH is reliable here)
|
||||
Create a `.env` file in the project root:
|
||||
|
||||
Ensure you've logged in via Git over HTTPS at least once so the keychain caches your credentials.
|
||||
```bash
|
||||
# Option A: Gitea Personal Access Tokens (Recommended)
|
||||
GITEA_TOKEN_DADESCHOOLS="your_token_here"
|
||||
GITEA_TOKEN_PRGS="your_token_here"
|
||||
|
||||
# Option B: Gitea Username & Password (fallback)
|
||||
GITEA_USER_DADESCHOOLS="username"
|
||||
GITEA_PASS_DADESCHOOLS="password"
|
||||
GITEA_USER_PRGS="username"
|
||||
GITEA_PASS_PRGS="password"
|
||||
|
||||
# Optional: Fallback to macOS Keychain (via git credential fill)
|
||||
# GITEA_USE_KEYCHAIN=1
|
||||
```
|
||||
|
||||
## MCP Server (Recommended)
|
||||
|
||||
@@ -158,7 +170,7 @@ Use `--help` on any Python script or shell script for full usage details.
|
||||
## Architecture
|
||||
|
||||
```
|
||||
auth.py ← shared auth & API helpers (get_credentials, api_request)
|
||||
gitea_auth.py ← shared auth & API helpers (get_credentials, api_request)
|
||||
mcp_server.py ← MCP server (FastMCP, stdio transport)
|
||||
create_issue.py ← CLI: create issues
|
||||
create_pr.py ← CLI: create PRs
|
||||
|
||||
Reference in New Issue
Block a user