fix: rename environment variables to match MCP server expectations
Gitea MCP server expects: - GITEA_API_URL (not GITEA_URL) - must include /api/v1 - GITEA_API_TOKEN (not GITEA_TOKEN) NetBox MCP server expects: - NETBOX_API_URL (not NETBOX_URL) - must include /api - NETBOX_API_TOKEN (not NETBOX_TOKEN) Changes: - Update all setup commands to use correct variable names - Update docs/CONFIGURATION.md with correct variables and URL format - Update scripts/setup.sh templates - Update CLAUDE.md hybrid configuration reference - Remove GITEA_ORG from system-level config (it's project-level) - Fix API URL paths in curl commands (remove redundant /api/v1) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -97,8 +97,8 @@ cat > ~/.config/claude/gitea.env << 'EOF'
|
||||
# Generated by pr-review /initial-setup
|
||||
# Note: GITEA_ORG is configured per-project in .env
|
||||
|
||||
GITEA_URL=<USER_PROVIDED_URL>
|
||||
GITEA_TOKEN=PASTE_YOUR_TOKEN_HERE
|
||||
GITEA_API_URL=<USER_PROVIDED_URL>
|
||||
GITEA_API_TOKEN=PASTE_YOUR_TOKEN_HERE
|
||||
EOF
|
||||
chmod 600 ~/.config/claude/gitea.env
|
||||
```
|
||||
@@ -163,7 +163,7 @@ git remote get-url origin 2>/dev/null | sed 's/.*[:/]\([^/]*\)\.git$/\1/' | sed
|
||||
|
||||
```bash
|
||||
source ~/.config/claude/gitea.env
|
||||
curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITEA_TOKEN" "$GITEA_URL/api/v1/repos/<detected-org>/<detected-repo>"
|
||||
curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITEA_API_TOKEN" "$GITEA_API_URL/repos/<detected-org>/<detected-repo>"
|
||||
```
|
||||
|
||||
| HTTP Code | Action |
|
||||
@@ -229,7 +229,7 @@ If customize, ask about:
|
||||
### Step 4.1: Test Configuration (if token was added)
|
||||
|
||||
```bash
|
||||
source ~/.config/claude/gitea.env && curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITEA_TOKEN" "$GITEA_URL/api/v1/user"
|
||||
source ~/.config/claude/gitea.env && curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITEA_API_TOKEN" "$GITEA_API_URL/user"
|
||||
```
|
||||
|
||||
Report result:
|
||||
|
||||
@@ -18,7 +18,7 @@ Fast setup for a new project when system-level configuration is already complete
|
||||
### Step 1: Verify System Configuration
|
||||
|
||||
```bash
|
||||
cat ~/.config/claude/gitea.env 2>/dev/null | grep -v "^#" | grep -v "PASTE_YOUR" | grep "GITEA_TOKEN=" && echo "SYSTEM_OK" || echo "SYSTEM_MISSING"
|
||||
cat ~/.config/claude/gitea.env 2>/dev/null | grep -v "^#" | grep -v "PASTE_YOUR" | grep "GITEA_API_TOKEN=" && echo "SYSTEM_OK" || echo "SYSTEM_MISSING"
|
||||
```
|
||||
|
||||
**If SYSTEM_MISSING:**
|
||||
@@ -67,7 +67,7 @@ git remote get-url origin 2>/dev/null | sed 's/.*[:/]\([^/]*\)\.git$/\1/' | sed
|
||||
|
||||
```bash
|
||||
source ~/.config/claude/gitea.env
|
||||
curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITEA_TOKEN" "$GITEA_URL/api/v1/repos/<detected-org>/<detected-repo>"
|
||||
curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITEA_API_TOKEN" "$GITEA_API_URL/repos/<detected-org>/<detected-repo>"
|
||||
```
|
||||
|
||||
| HTTP Code | Action |
|
||||
|
||||
@@ -17,7 +17,7 @@ Updates project configuration when the git remote URL has changed.
|
||||
## Step 1: Verify System Configuration
|
||||
|
||||
```bash
|
||||
cat ~/.config/claude/gitea.env 2>/dev/null | grep -v "^#" | grep -v "PASTE_YOUR" | grep "GITEA_TOKEN=" && echo "SYSTEM_OK" || echo "SYSTEM_MISSING"
|
||||
cat ~/.config/claude/gitea.env 2>/dev/null | grep -v "^#" | grep -v "PASTE_YOUR" | grep "GITEA_API_TOKEN=" && echo "SYSTEM_OK" || echo "SYSTEM_MISSING"
|
||||
```
|
||||
|
||||
**If SYSTEM_MISSING:** Run `/initial-setup` first.
|
||||
@@ -59,7 +59,7 @@ Extract organization and repository from URL.
|
||||
|
||||
```bash
|
||||
source ~/.config/claude/gitea.env
|
||||
curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITEA_TOKEN" "$GITEA_URL/api/v1/repos/<NEW_ORG>/<NEW_REPO>"
|
||||
curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token $GITEA_API_TOKEN" "$GITEA_API_URL/repos/<NEW_ORG>/<NEW_REPO>"
|
||||
```
|
||||
|
||||
| Code | Action |
|
||||
|
||||
Reference in New Issue
Block a user