DIYgod/RSSHub · error · ConfigNotFoundError

GitHub star RSS is disabled due to the lack of <a href="http

Error message

GitHub star RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>

What it means

Thrown as a ConfigNotFoundError by the GitHub Stars route when config.github.access_token is not set. The route uses the GitHub GraphQL API to list users who starred a repository, which requires authentication. The guard is identical to the other GitHub routes.

Source

Thrown at lib/routes/github/star.ts:33

            {
                name: 'GITHUB_ACCESS_TOKEN',
                description: 'GitHub Access Token',
            },
        ],
    },
    radar: [
        {
            source: ['github.com/:user/:repo/stargazers', 'github.com/:user/:repo'],
        },
    ],
    name: 'Repo Stars',
    maintainers: ['HenryQW'],
    handler,
};

async function handler(ctx) {
    if (!config.github || !config.github.access_token) {
        throw new ConfigNotFoundError('GitHub star RSS is disabled due to the lack of <a href="https://docs.rsshub.app/deploy/config#route-specific-configurations">relevant config</a>');
    }
    const user = ctx.req.param('user');
    const repo = ctx.req.param('repo');

    const host = `https://github.com/${user}/${repo}/stargazers`;
    const url = 'https://api.github.com/graphql';

    const response = await got({
        method: 'post',
        url,
        headers: {
            Authorization: `bearer ${config.github.access_token}`,
        },
        json: {
            query: /* GraphQL */ `
            {
                repository(owner: "${user}", name: "${repo}") {
                  stargazers(last: 10) {

View on GitHub (pinned to bed535e087)

Solutions

  1. Set GITHUB_ACCESS_TOKEN to a valid GitHub personal access token
  2. If using docker-compose, ensure the env var is listed under the service's environment or env_file
  3. Confirm the token is valid by testing 'curl -H "Authorization: bearer ghp_xxx" https://api.github.com/graphql'
  4. Restart RSSHub after configuration changes

Example fix

// Configuration fix:
// Set GITHUB_ACCESS_TOKEN=ghp_your_token and restart RSSHub
Defensive patterns

Strategy: validation

Validate before calling

// Pre-flight check for GitHub token
if (!config.github?.access_token) {
    throw new ConfigNotFoundError('GITHUB_ACCESS_TOKEN is required for GitHub star feeds');
}

Type guard

function hasGitHubToken(cfg: typeof config): cfg is typeof config & { github: { access_token: string } } {
    return !!cfg.github?.access_token;
}

Prevention

When it happens

Trigger: Any request to /github/:user/:repo/stars (or the stargazers route) when GITHUB_ACCESS_TOKEN is not configured. The GraphQL stargazers query requires authentication.

Common situations: RSSHub deployed without GITHUB_ACCESS_TOKEN; token revoked; env var not passed through in container orchestration (Kubernetes secret, Docker Compose env_file mismatch).

Related errors


AI-assisted analysis of DIYgod/RSSHub@bed535e087 (2026-08-12). Data as JSON: /api/errors/a6b5617aa9ee2f30. Report an issue: GitHub.