diff --git a/otterdog/webapp/config.py b/otterdog/webapp/config.py index 6d34c1e3..e0bf779e 100644 --- a/otterdog/webapp/config.py +++ b/otterdog/webapp/config.py @@ -33,6 +33,7 @@ class AppConfig(object): OTTERDOG_CONFIG_OWNER = config("OTTERDOG_CONFIG_OWNER", default=None) OTTERDOG_CONFIG_REPO = config("OTTERDOG_CONFIG_REPO", default=None) OTTERDOG_CONFIG_PATH = config("OTTERDOG_CONFIG_PATH", default=None) + OTTERDOG_CONFIG_TOKEN = config("OTTERDOG_CONFIG_TOKEN", default=None) # Set up the App SECRET_KEY SECRET_KEY = config("SECRET_KEY", default=None) diff --git a/otterdog/webapp/utils.py b/otterdog/webapp/utils.py index 42522763..0e87fe10 100644 --- a/otterdog/webapp/utils.py +++ b/otterdog/webapp/utils.py @@ -83,7 +83,7 @@ async def _load_otterdog_config(ref: Optional[str] = None) -> OtterdogConfig: f"'https://github.com/{config_file_owner}/{config_file_repo}/{config_file_path}'" ) - rest_api = RestApi() # do not use authentication for retrieving the config file + rest_api = RestApi(token_auth(current_app.config["OTTERDOG_CONFIG_TOKEN"])) content = await rest_api.content.get_content(config_file_owner, config_file_repo, config_file_path, ref) import aiofiles