import os import requests TOKEN = os.getenv("GITEA_READ_TOKEN") if not TOKEN: raise RuntimeError("Переменная окружения GITEA_READ_TOKEN не задана") headers = {"Authorization": f"token {TOKEN}"} response = requests.get("https://git.vyatsu.ru/api/v1/user", headers=headers) print(response.status_code) print(response.text)