Daily Operations
Daily Workflows
Load Credentials for Automation
# Load ISE lab credentials
eval "$(dsec source d000 dev/network)"
# Verify loaded
env | grep ISE
# Run automation
python3 query_ise.py
# Clear when done
eval "$(dsec unsource)"
Backup Operations
Troubleshooting
CI/CD Operations
Load CI/CD Credentials
# Load CI/CD credentials (Gitea token, etc.)
dsource d000 dev/cicd
# Verify loaded
env | grep GITEA
# Clear when done
dsunsource
Gitea API Access
The Gitea API requires port 3000 for write operations. The nginx reverse proxy on the standard HTTPS port returns 405 Method Not Allowed for POST/PUT/DELETE requests.
|
| Endpoint | Usage |
|---|---|
Web UI only (GET requests work) |
|
Full API access (all HTTP methods) |
Create Repository via API
# Load credentials
dsource d000 dev/cicd
# Create private repo
curl -X POST "https://gitea-01.inside.domusdigitalis.dev:3000/api/v1/user/repos" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "my-repo",
"private": true,
"description": "Repository description"
}'
Create Template Repository
curl -X POST "https://gitea-01.inside.domusdigitalis.dev:3000/api/v1/user/repos" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d '{
"name": "my-template",
"private": true,
"template": true,
"description": "Template repository"
}'
Troubleshooting: 405 Method Not Allowed
If you receive 405 Method Not Allowed on POST requests:
# Wrong - nginx proxy blocks POST
curl -X POST "https://gitea-01.inside.domusdigitalis.dev/api/v1/user/repos" ...
# Correct - use port 3000
curl -X POST "https://gitea-01.inside.domusdigitalis.dev:3000/api/v1/user/repos" ...
Update GITEA_URL in ~/.secrets/environments/domains/d000/dev/cicd.env.age to include :3000 for API operations.
|