{"record":{"id":"a6b5617aa9ee2f30","repo":"DIYgod/RSSHub","slug":"github-star-rss-is-disabled-due-to-the-lack-of-a","errorCode":null,"errorMessage":"GitHub star RSS is disabled due to the lack of <a href=\"https://docs.rsshub.app/deploy/config#route-specific-configurations\">relevant config</a>","messagePattern":"GitHub star RSS is disabled due to the lack of <a href=\"https://docs\\.rsshub\\.app/deploy/config#route-specific-configurations\">relevant config</a>","errorType":"exception","errorClass":"ConfigNotFoundError","httpStatus":null,"severity":"error","filePath":"lib/routes/github/star.ts","lineNumber":33,"sourceCode":"            {\n                name: 'GITHUB_ACCESS_TOKEN',\n                description: 'GitHub Access Token',\n            },\n        ],\n    },\n    radar: [\n        {\n            source: ['github.com/:user/:repo/stargazers', 'github.com/:user/:repo'],\n        },\n    ],\n    name: 'Repo Stars',\n    maintainers: ['HenryQW'],\n    handler,\n};\n\nasync function handler(ctx) {\n    if (!config.github || !config.github.access_token) {\n        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>');\n    }\n    const user = ctx.req.param('user');\n    const repo = ctx.req.param('repo');\n\n    const host = `https://github.com/${user}/${repo}/stargazers`;\n    const url = 'https://api.github.com/graphql';\n\n    const response = await got({\n        method: 'post',\n        url,\n        headers: {\n            Authorization: `bearer ${config.github.access_token}`,\n        },\n        json: {\n            query: /* GraphQL */ `\n            {\n                repository(owner: \"${user}\", name: \"${repo}\") {\n                  stargazers(last: 10) {","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/github/star.ts#L15-L51","documentation":"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.","triggerScenarios":"Any request to /github/:user/:repo/stars (or the stargazers route) when GITHUB_ACCESS_TOKEN is not configured. The GraphQL stargazers query requires authentication.","commonSituations":"RSSHub deployed without GITHUB_ACCESS_TOKEN; token revoked; env var not passed through in container orchestration (Kubernetes secret, Docker Compose env_file mismatch).","solutions":["Set GITHUB_ACCESS_TOKEN to a valid GitHub personal access token","If using docker-compose, ensure the env var is listed under the service's environment or env_file","Confirm the token is valid by testing 'curl -H \"Authorization: bearer ghp_xxx\" https://api.github.com/graphql'","Restart RSSHub after configuration changes"],"exampleFix":"// Configuration fix:\n// Set GITHUB_ACCESS_TOKEN=ghp_your_token and restart RSSHub","handlingStrategy":"validation","validationCode":"// Pre-flight check for GitHub token\nif (!config.github?.access_token) {\n    throw new ConfigNotFoundError('GITHUB_ACCESS_TOKEN is required for GitHub star feeds');\n}","typeGuard":"function hasGitHubToken(cfg: typeof config): cfg is typeof config & { github: { access_token: string } } {\n    return !!cfg.github?.access_token;\n}","tryCatchPattern":null,"preventionTips":["Set GITHUB_ACCESS_TOKEN environment variable","Ensure Docker Compose passes the env var to the container","Verify the token via the GraphQL API before deploying","Restart the RSSHub process after configuration"],"tags":["config","github","authentication","missing-config","config-not-found"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}