GitHub 应用程序访问组织中的其他存储库

GitHub App access to other repositories in organization

我在组织下创建了一个 Github 应用程序,并安装到同一组织下的存储库中。此应用需要对同一组织中的其他存储库的读取权限才能获取配置。在使用 github3 login_as_app_installation API 进行身份验证后,我尝试从不同的存储库读取文件。我得到以下错误

  File "lib/python3.6/site-packages/github3/github.py", line 1981, in repository
    json = self._json(self._get(url), 200)
  File "lib/python3.6/site-packages/github3/models.py", line 156, in _json
    raise exceptions.error_for(response)
github3.exceptions.NotFoundError: 404 Not Found

但是,如果我将应用程序安装到我需要读取权限的每个存储库,这将起作用。我是否可以在不显式安装应用程序的情况下实现此目的,因为在组织级别没有访问令牌的概念?

安装令牌只允许访问安装应用程序的存储库。如果我们需要访问其他存储库,我们需要将应用程序安装到存储库或使用个人访问令牌访问它