cool
This commit is contained in:
50
gitea-push-mirror-setup.md
Normal file
50
gitea-push-mirror-setup.md
Normal file
@@ -0,0 +1,50 @@
|
||||
# Gitea Push Mirror Setup Instructions
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- Gitea API token
|
||||
- GitHub Personal Access Token (PAT) with `repo` scope
|
||||
|
||||
## Tokens
|
||||
|
||||
| Service | Token |
|
||||
|---------|-------|
|
||||
| Gitea | `1b99442d046cdfa2f5d76322a6081131a0561c53` |
|
||||
| GitHub | `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` |
|
||||
|
||||
## API Endpoint
|
||||
|
||||
```
|
||||
POST http://192.168.1.1:3000/api/v1/repos/{owner}/{repo}/push_mirrors
|
||||
```
|
||||
|
||||
## Command Template
|
||||
|
||||
```bash
|
||||
curl -X POST "http://192.168.1.1:3000/api/v1/repos/Ethanfel/{REPO_NAME}/push_mirrors" \
|
||||
-H "Authorization: token 1b99442d046cdfa2f5d76322a6081131a0561c53" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{
|
||||
"remote_address": "https://github.com/Ethanfel/{REPO_NAME}.git",
|
||||
"remote_username": "Ethanfel",
|
||||
"remote_password": "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",
|
||||
"interval": "8h0m0s",
|
||||
"sync_on_commit": true
|
||||
}'
|
||||
```
|
||||
|
||||
Replace `{REPO_NAME}` with the actual repository name.
|
||||
|
||||
## Verify Mirror
|
||||
|
||||
```bash
|
||||
curl "http://192.168.1.1:3000/api/v1/repos/Ethanfel/{REPO_NAME}/push_mirrors" \
|
||||
-H "Authorization: token 1b99442d046cdfa2f5d76322a6081131a0561c53"
|
||||
```
|
||||
|
||||
## Notes
|
||||
|
||||
- GitHub repo must exist before creating the mirror
|
||||
- Gitea runs on port 3000 (not 443)
|
||||
- `sync_on_commit: true` pushes to GitHub on every commit
|
||||
- `interval: 8h0m0s` syncs every 8 hours regardless of commits
|
||||
1260
symlink.py
1260
symlink.py
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user