>
cd ~/server/traefik
python3 - <<'PY'
import json, base64
p="ghcr-config.json"
d=json.load(open(p,"r",encoding="utf-8"))
auth=d["auths"]["ghcr.io"]["auth"]
print("auth_length:", len(auth))
try:
raw=base64.b64decode(auth, validate=True)
print("base64_ok: True")
print("decoded_prefix:", raw[:10], "decoded_len:", len(raw))
except Exception as e:
print("base64_ok: False")
print("error:", e)
PY
cd ~/server/traefik
read -s "?GHCR PAT 입력: " PAT; echo
AUTH=$(printf '%s' "qbg5652:${PAT}" | base64 | tr -d '\n')
printf '{"auths":{"ghcr.io":{"auth":"%s"}}}\n' "$AUTH" > ghcr-config.json
chmod 600 ghcr-config.json
unset PAT AUTH
mkdir -p /tmp/ghcrtest
cp ~/server/traefik/ghcr-config.json /tmp/ghcrtest/config.json
docker --config /tmp/ghcrtest pull ghcr.io/qbg5652/bongdroid:latest
docker --config /tmp/ghcrtest pull ghcr.io/qbg5652/dailist_homepage:latest
docker --config /tmp/ghcrtest pull ghcr.io/qbg5652/recifit_backend:latest
docker --config /tmp/ghcrtest pull ghcr.io/qbg5652/recifit_batch:latest
cd ~/server/traefik
docker compose up -d --force-recreate watchtower
docker logs watchtower --tail 120 | egrep -i "illegal base64|unauthorized|denied|updated|scanned|Loaded auth|config.json"
PAT 입력하는 건 github 접속 : settings > Develooer settings > Personal access tokens > 토큰 확인 후 입력하면 됨.
| [6/18] KPT 회고 (0) | 2025.06.19 |
|---|---|
| [5/26] KPT 회고 (1) | 2025.05.26 |
| [부트캠프] 8주차 3 (0) | 2025.04.23 |
| [부트캠프] 8주차 2 (0) | 2025.04.22 |
| [부트캠프] 8주차 1 (0) | 2025.04.21 |