mirror of
https://github.com/deadcxap/init_scripts.git
synced 2026-07-02 05:43:40 +03:00
PAT авторизация для приватной репы
This commit is contained in:
@@ -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
|
||||
curl -fsSL https://raw.githubusercontent.com/deadcxap/init_scripts/main/setup.sh | \
|
||||
sudo bash -s -- --user <username> --sshkey "<ssh_pubkey>" \
|
||||
[--ssh-ip <ssh_allowed_ip>] [--monitor-ip <monitor_ip>] \
|
||||
[--vector <vector_endpoint>] \
|
||||
[--role <name>] \
|
||||
[--netbird-key <key> [--netbird-ip <ip> --netbird-port <port>]]
|
||||
bash <(curl -sL https://raw.githubusercontent.com/deadcxap/init_scripts/main/setup.sh) \
|
||||
--user <username> --sshkey "<ssh_pubkey>" \
|
||||
[--ssh-ip <ssh_allowed_ip>] \
|
||||
[--monitor-ip <monitor_ip>] \
|
||||
[--vector <vector_endpoint>] \
|
||||
[--role <name>] \
|
||||
[--netbird-key <key> [--netbird-ip <ip> --netbird-port <port>]]
|
||||
```
|
||||
|
||||
Параметры:
|
||||
|
||||
Reference in New Issue
Block a user