PAT авторизация для приватной репы

This commit is contained in:
2025-08-24 05:31:25 +03:00
parent 71af78700b
commit b5f0c4ee0e
+25 -7
View File
@@ -22,15 +22,33 @@
## Использование ## Использование
Запуск осуществляется одной командой: Запуск (или из-под root, или sudo sh):
Так как репозиторий приватный, надо сперва автризоваться на github:
- сгенерировать [PAT (personal access token)](https://github.com/settings/personal-access-tokens/new)
с правами **Contents: Read** ТОЛЬКО НА НУЖНЫЙ РЕПОЗИТОРИЙ!
- добавить токен в окружение:
```bash
export GITHUB_TOKEN='ghp_...'
export CURL_HOME="$(mktemp -d)"
printf 'header = "Authorization: Bearer %s"\n' "$GITHUB_TOKEN" >
"$CURL_HOME/.curlrc"
```
- после выполнения настройки - удалить авторизацию для безопасности
```bash
rm -rf "$CURL_HOME"
unset CURL_HOME GITHUB_TOKEN
```
```bash ```bash
curl -fsSL https://raw.githubusercontent.com/deadcxap/init_scripts/main/setup.sh | \ bash <(curl -sL https://raw.githubusercontent.com/deadcxap/init_scripts/main/setup.sh) \
sudo bash -s -- --user <username> --sshkey "<ssh_pubkey>" \ --user <username> --sshkey "<ssh_pubkey>" \
[--ssh-ip <ssh_allowed_ip>] [--monitor-ip <monitor_ip>] \ [--ssh-ip <ssh_allowed_ip>] \
[--vector <vector_endpoint>] \ [--monitor-ip <monitor_ip>] \
[--role <name>] \ [--vector <vector_endpoint>] \
[--netbird-key <key> [--netbird-ip <ip> --netbird-port <port>]] [--role <name>] \
[--netbird-key <key> [--netbird-ip <ip> --netbird-port <port>]]
``` ```
Параметры: Параметры: