mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
3.5 KiB
3.5 KiB
Woodpecker Repository Setup Guide
Issue: Repository Not Showing in Sync UI
Problem
When syncing repositories in Woodpecker UI, some repositories (especially private ones) may not appear due to:
- Pagination Limits: GitHub API pagination limits (default 30-100 repos per page)
- OAuth Permissions: Missing repository access permissions
- Repository ID Format: Woodpecker requires numeric GitHub repository ID, not GraphQL node ID
Solution: Add Repository Manually via CLI
Step 1: Get GitHub Repository ID
# Get numeric repository ID (not GraphQL node ID)
gh api repos/SamyRai/turash --jq '.id'
# Output: 1103592817
Step 2: Add Repository to Woodpecker
# Use numeric ID (not R_kgDOQcd9cQ format)
woodpecker-cli repo add 1103592817
Step 3: Verify Repository
# List repositories
woodpecker-cli repo ls | grep turash
# Show repository details
woodpecker-cli repo show SamyRai/turash
Configure Harbor Registry
# Add Harbor registry
woodpecker-cli repo registry add SamyRai/turash \
--hostname registry.bk.glpx.pro \
--username admin \
--password "nVbR0IZv02zdZaM1zqjOz8FVbdzmXlEUaOb59D5Bkz0="
Configure Secrets
# Add Docker credentials
woodpecker-cli repo secret add SamyRai/turash \
--name docker_username \
--value admin
woodpecker-cli repo secret add SamyRai/turash \
--name docker_password \
--value "nVbR0IZv02zdZaM1zqjOz8FVbdzmXlEUaOb59D5Bkz0="
Verify Configuration
# List registries
woodpecker-cli repo registry ls SamyRai/turash
# List secrets
woodpecker-cli repo secret ls SamyRai/turash
Understanding Repository IDs
GitHub Repository ID Formats
-
Numeric ID (What Woodpecker needs):
gh api repos/OWNER/REPO --jq '.id' # Example: 1103592817 -
GraphQL Node ID (Not compatible):
gh repo view OWNER/REPO --json id # Example: R_kgDOQcd9cQ
Why Sync UI May Not Show All Repos
- Pagination: GitHub API returns repositories in pages (default 30 per page)
- Private Repos: May require additional OAuth scopes
- Rate Limiting: Too many repos can hit API rate limits
- UI Filtering: UI may filter by active/inactive status
Best Practices
- Add Important Repos Manually: Use CLI for critical repositories
- Check OAuth Scopes: Ensure
reposcope is granted for private repos - Use Sync for Discovery: Use UI sync to discover repos, then activate manually
- Monitor Active Status: Only active repositories run pipelines
Troubleshooting
Repository Not Found (404)
# Check if repository exists in GitHub
gh repo view SamyRai/turash
# Verify numeric ID
gh api repos/SamyRai/turash --jq '.id'
# Try adding with numeric ID
woodpecker-cli repo add <numeric-id>
Can't Add Registry/Secrets
# Verify repository is active
woodpecker-cli repo show SamyRai/turash | grep ACTIVE
# Check repository ID format
woodpecker-cli repo show SamyRai/turash | grep ID
Sync UI Still Not Showing
- Refresh Browser: Clear cache and refresh
- Check Permissions: Verify GitHub OAuth token has
reposcope - Use CLI: Add repositories manually via CLI (more reliable)
- Check Logs: Review Woodpecker server logs for sync errors
Current Status
✅ Repository Added: SamyRai/turash (ID: 1103592817)
✅ Active: Yes
✅ Registry Configured: registry.bk.glpx.pro
✅ Secrets Configured: docker_username, docker_password
Repository is ready for CI/CD! 🚀