larksuite/cli · error
%s=%q is ignored: credentials are provided externally
Error message
%s=%q is ignored: credentials are provided externally
What it means
doctor's informational check, not a hard failure: an external credential provider resolved the account, so an explicitly passed profile selector cannot have any effect; doctor says so because nothing else in the session will. Detected via ProfileName, which only the built-in config-backed provider populates.
Source
Thrown at cmd/doctor/doctor.go:143
var cfgErr *errs.ConfigError
if errors.As(projector.Render(err), &cfgErr) {
hint = cfgErr.Hint
}
checks = append(checks, fail("app_resolved", err.Error(), hint))
return finishDoctor(f, checks)
}
checks = append(checks, pass("app_resolved", fmt.Sprintf("app: %s (%s)", cfg.AppID, cfg.Brand)))
// An external credential provider resolves the account without consulting
// profiles at all, so an explicit selector is silently inert. Say so:
// nothing else in the session will. ProfileName is only populated by the
// built-in config-backed provider, which makes it the provider telltale.
if f.Invocation.Profile != "" && cfg.ProfileName == "" {
selector := "--profile"
if f.Invocation.ProfileSource == core.ProfileFromEnvironment {
selector = envvars.CliProfile
}
checks = append(checks, warn("profile_selector",
fmt.Sprintf("%s=%q is ignored: credentials are provided externally", selector, f.Invocation.Profile),
fmt.Sprintf("unset %s, or remove the external credential variables to select accounts by profile", selector)))
}
ep := core.ResolveEndpoints(cfg.Brand)
// ── 3. Identity readiness ──
diagnostics := identitydiag.FilterRecovery(
identitydiag.Diagnose(opts.Ctx, f, cfg, !opts.Offline),
projector.CanReference,
)
checks = append(checks,
identityCheck("bot_identity", diagnostics.Bot),
identityCheck("user_identity", diagnostics.User),
)
if diagnostics.Bot.Available || diagnostics.User.Available {
checks = append(checks, pass("identity_ready", "at least one identity is available"))
} else {View on GitHub (pinned to 7fd6ef3c07)
Solutions
- Drop the inert selector from the invocation or environment
- Switch back to the built-in config-backed provider if profile selection is required
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at cmd/doctor/doctor.go:143 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of larksuite/cli@7fd6ef3c07 (2026-09-04).
Data as JSON: /api/errors/8f835641c565b3b1.
Report an issue: GitHub.