{"record":{"id":"4e806e5e9319fc12","repo":"gitbutlerapp/gitbutler","slug":"no-authenticated-forge-users-found-run-to-au","errorCode":null,"errorMessage":"No authenticated forge users found.\nRun '{}' to authenticate with {}.","messagePattern":"No authenticated forge users found\\.\nRun '(.+?)' to authenticate with (.+?)\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but/src/command/legacy/forge/review.rs","lineNumber":416,"sourceCode":"        but_forge::check_forge_account_is_valid(preferred_forge_user, &forge_repo_info, &storage)\n            .await?;\n\n    let forge_display_name = match forge_repo_info.forge {\n        but_forge::ForgeName::Azure => {\n            anyhow::bail!(\"Azure is unsupported at the minute. Sorry 😞.\");\n        }\n        but_forge::ForgeName::GitHub => \"GitHub\",\n        but_forge::ForgeName::GitLab => \"GitLab\",\n        but_forge::ForgeName::Bitbucket => \"Bitbucket\",\n    };\n\n    match account_validity {\n        but_forge::ForgeAccountValidity::Invalid => Err(anyhow::anyhow!(\n            \"Known account is not correctly authenticated.\\nRun '{}' to authenticate with {}.\",\n            \"but config forge auth\",\n            forge_display_name\n        )),\n        but_forge::ForgeAccountValidity::NoCredentials => Err(anyhow::anyhow!(\n            \"No authenticated forge users found.\\nRun '{}' to authenticate with {}.\",\n            \"but config forge auth\",\n            forge_display_name\n        )),\n        but_forge::ForgeAccountValidity::Valid => {\n            // All good, continue\n            Ok(())\n        }\n    }\n}\n\n/// Get list of branch names that don't have PRs yet.\nfn get_branches_without_prs(\n    review_map: &std::collections::HashMap<String, Vec<but_forge::ForgeReview>>,\n    applied_stacks: &[HeadInfoStack],\n) -> anyhow::Result<Vec<String>> {\n    let mut branches_without_prs = Vec::new();\n    for stack_entry in applied_stacks {","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but/src/command/legacy/forge/review.rs#L398-L434","documentation":"Same `but forge review` preflight as the Invalid case, but for `ForgeAccountValidity::NoCredentials`: the credential store has no authenticated forge user for the remote's forge at all. The command stops before any forge request and points to `but config forge auth`, with the display name derived from the repo's forge.","triggerScenarios":"Running `but forge review` on an install where `but config forge auth` was never completed, the credential store was cleared, or the repo's remote is served by a forge that has no authenticated user.","commonSituations":"Fresh `but` install or new workstation; review attempted on a newly cloned repo before onboarding; CI runner with a clean home directory; user authenticated only with GitHub while the remote is GitLab or Bitbucket.","solutions":["Run `but config forge auth`, pick the forge shown in the error, and finish the authentication flow","Confirm the intended user was added (re-run auth if the wrong account was selected)","Re-run `but forge review`"],"exampleFix":"# before\nbut forge review\n# error: No authenticated forge users found.\n\n# after\nbut config forge auth   # authenticate with the forge named in the message\nbut forge review","handlingStrategy":"validation","validationCode":"# Provision credentials as part of onboarding, before review commands\nbut setup              # workspace onboarding\nbut config forge auth  # ensure a forge user exists for the remote's forge","typeGuard":"fn has_forge_credentials(v: &but_forge::ForgeAccountValidity) -> bool {\n    !matches!(v, but_forge::ForgeAccountValidity::NoCredentials)\n}","tryCatchPattern":"let out = Command::new(\"but\").args([\"forge\", \"review\"]).output()?;\nif !out.status.success()\n    && String::from_utf8_lossy(&out.stderr).contains(\"No authenticated forge users\")\n{\n    eprintln!(\"run `but config forge auth` first\");\n}","preventionTips":["Make `but config forge auth` the first step after installing or cloning","Gate review/publish jobs on an auth preflight so failures name the fix","Re-check auth after clearing caches or switching machines"],"tags":["forge","authentication","onboarding","cli"],"backgroundTag":"missing-credentials","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","schemaVersion":2},"datasetVersion":"2026-09-01T03:17:15.561Z"}