mirror of
https://gitverse.ru/kpa39l/git-forge-management.git
synced 2026-09-29 09:15:05 +00:00
30 lines
950 B
Markdown
30 lines
950 B
Markdown
# Gitea на nixg.ru — сессия 2026-07-19
|
|
|
|
- URL: https://gitea.nixg.ru
|
|
- API: https://gitea.nixg.ru/api/v1
|
|
- Версия: 1.26.2
|
|
- Пользователь: hermes
|
|
- Репозиторий создан: `email-assistant`
|
|
- Clone URL: `https://gitea.nixg.ru/hermes/email-assistant.git`
|
|
- SSH: `ssh://git@gitea.nixg.ru:2222/hermes/email-assistant.git`
|
|
- Ветка по умолчанию: `main` (Gitea создал main, локально master → push потребовал переименования)
|
|
|
|
## API-паттерн
|
|
|
|
```bash
|
|
# Basic Auth
|
|
AUTH="-u hermes:password_here"
|
|
BASE="https://gitea.nixg.ru/api/v1"
|
|
|
|
# Check auth
|
|
curl -s ${AUTH} "${BASE}/user"
|
|
|
|
# Create repo
|
|
curl -s -X POST ${AUTH} "${BASE}/user/repos" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"name": "repo-name", "private": false}'
|
|
|
|
# Push URL with credentials embedded
|
|
git remote add origin "https://hermes:password_here@gitea.nixg.ru/hermes/repo-name.git"
|
|
```
|