continuedev/continue · error · Error
GitHub token not found.
Error message
GitHub token not found.
What it means
Companion guard to the Greptile token check: getContextItems throws when getGithubToken() returns nothing. Greptile needs a GitHub token to access the repository, and this provider requires it even before any network call.
Source
Thrown at core/context/providers/GreptileContextProvider.ts:35
type: "query",
};
get deprecationMessage() {
return "The Greptile context provider is now deprecated and will be removed in a later version. Please consider viewing their docs at greptile.com/docs/code-review-bot/auto-resolve-with-mcp for resolving greptile queries.";
}
async getContextItems(
query: string,
extras: ContextProviderExtras,
): Promise<ContextItem[]> {
const greptileToken = this.getGreptileToken();
if (!greptileToken) {
throw new Error("Greptile token not found.");
}
const githubToken = this.getGithubToken();
if (!githubToken) {
throw new Error("GitHub token not found.");
}
let absPath = await this.getWorkspaceDir(extras);
if (!absPath) {
throw new Error("Failed to determine the workspace directory.");
}
var remoteUrl = getRemoteUrl(absPath);
remoteUrl = getRemoteUrl(absPath);
const repoName = extractRepoName(remoteUrl);
const branch = getCurrentBranch(absPath);
const remoteType = getRemoteType(remoteUrl);
if (!remoteType) {
throw new Error("Unable to determine remote type.");
}
const options = {View on GitHub (pinned to 5522c6f44c)
Solutions
- Set GITHUB_TOKEN (or the provider's GitHub token option) with repo read scope
- Verify the token works: curl -H "Authorization: Bearer $GITHUB_TOKEN" https://api.github.com/user
- Restart the IDE so the backend process inherits the variable
Example fix
# before: no token export GREPTILE_AUTH_TOKEN=gtp_xxx # after export GREPTILE_AUTH_TOKEN=gtp_xxx export GITHUB_TOKEN=ghp_xxx
Defensive patterns
Strategy: validation
Validate before calling
const gh = params.GitHubToken ?? process.env.GITHUB_TOKEN;
if (!gh) disableProvider('greptile'); Try / catch
catch (e) { if (/GitHub token/.test(e.message)) promptForToken('GITHUB_TOKEN'); } Prevention
- Store both Greptile and GitHub tokens together in a launch env file
- Test tokens with a one-line curl before enabling the provider
When it happens
Trigger: Using the greptile provider with no GitHub token in options or the GITHUB_TOKEN / GH_ env vars the provider reads.
Common situations: Greptile token configured but GitHub token forgotten; GitHub token set only in gh CLI keyring, not in the environment; fine-grained PAT without repo scope.
Understand the failure class
Background: "API key is required" / "API key not found" / "No API key was set": the missing-api-key error family across 16 libraries — this error's family across 16 libraries.
Related errors
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/497b70d9c706d28a.
Report an issue: GitHub.