{"record":{"id":"575bf0d138047554","repo":"github/spec-kit","slug":"providers-i-unknown-provider-provider-r-reg","errorCode":null,"errorMessage":"providers[{i}]: unknown provider {provider!r}; registered: {sorted(AUTH_REGISTRY.keys())}","messagePattern":"providers\\[(.+?)\\]: unknown provider (.+?); registered: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"src/specify_cli/authentication/config.py","lineNumber":167,"sourceCode":"        auth = entry_raw.get(\"auth\", \"\")\n        if not isinstance(auth, str) or not auth:\n            raise ValueError(f\"providers[{i}]: 'auth' must be a non-empty string\")\n\n        token = entry_raw.get(\"token\")\n        token_env = entry_raw.get(\"token_env\")\n\n        # Validate token/token_env types\n        if token is not None and (not isinstance(token, str) or not token.strip()):\n            raise ValueError(f\"providers[{i}]: 'token' must be a non-empty string\")\n        if token_env is not None and (not isinstance(token_env, str) or not token_env.strip()):\n            raise ValueError(f\"providers[{i}]: 'token_env' must be a non-empty string\")\n\n        # Validate provider+scheme compatibility\n        from . import get_provider as _get_provider\n        _prov = _get_provider(provider)\n        if _prov is None:\n            from . import AUTH_REGISTRY\n            raise ValueError(\n                f\"providers[{i}]: unknown provider {provider!r}; \"\n                f\"registered: {sorted(AUTH_REGISTRY.keys())}\"\n            )\n        if auth not in _prov.supported_auth_schemes:\n            raise ValueError(\n                f\"providers[{i}]: provider {provider!r} does not support \"\n                f\"auth scheme {auth!r}; supported: {list(_prov.supported_auth_schemes)}\"\n            )\n\n        # Validate token source based on auth scheme\n        if auth in (\"bearer\", \"basic-pat\"):\n            if not token and not token_env:\n                raise ValueError(\n                    f\"providers[{i}]: auth={auth!r} requires 'token' or 'token_env'\"\n                )\n        elif auth == \"azure-ad\":\n            tenant_id = entry_raw.get(\"tenant_id\")\n            client_id = entry_raw.get(\"client_id\")","sourceCodeStart":149,"sourceCodeEnd":185,"githubUrl":"https://github.com/github/spec-kit/blob/bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c/src/specify_cli/authentication/config.py#L149-L185","documentation":"Raised when `get_provider(provider)` returns `None` — the `provider` string does not match any key in `AUTH_REGISTRY`. The message lists all registered provider keys so you can see exactly what names are accepted.","triggerScenarios":"A `provider` value like `\"gh\"`, `\"GitHub\"` (case-sensitive lookup), `\"azure-devops-cl\"`, or any name not in `sorted(AUTH_REGISTRY.keys())`.","commonSituations":"Using an alias or abbreviation instead of the canonical registry key; case mismatch (`Github` vs `github`); referencing a provider added in a newer version of spec-kit than the installed one.","solutions":["Read the `registered: [...]` list in the error and use one of those exact keys","Match the case exactly — lookup is case-sensitive","Upgrade spec-kit if the provider you need is a recently added one"],"exampleFix":"# before\n- hosts: [\"github.com\"]\n  provider: gh\n\n# after\n- hosts: [\"github.com\"]\n  provider: github","handlingStrategy":"type-guard","validationCode":"from specify_cli.authentication import AUTH_REGISTRY, get_provider\n\nif get_provider(entry[\"provider\"]) is None:\n    raise SystemExit(\n        f\"unknown provider {entry['provider']!r}; \"\n        f\"choose from {sorted(AUTH_REGISTRY)}\"\n    )","typeGuard":"from specify_cli.authentication import get_provider\n\ndef is_registered_provider(name: object) -> bool:\n    return isinstance(name, str) and get_provider(name) is not None","tryCatchPattern":"try:\n    load_auth_config(raw)\nexcept ValueError as exc:\n    if \"unknown provider\" in str(exc):\n        # parse the 'registered: [...]' list from the message and re-prompt\n        raise\n    raise","preventionTips":["Resolve provider names against AUTH_REGISTRY programmatically instead of hardcoding strings","Pin the spec-kit version so the set of registered providers is stable"],"tags":["authentication","config","registry","validation"],"backgroundTag":null,"analyzedSha":"bf88c9f9a82fa370c7a7257aa2b3cf10b457b65c","analyzedAt":"2026-08-14T19:43:37.150Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}