{"record":{"id":"b9d7e6519cc53dbf","repo":"goharbor/harbor","slug":"error-storage-driver-s-is-not-supported-only-th","errorCode":null,"errorMessage":"Error: storage driver %s is not supported, only the following ones are supported: %s","messagePattern":"Error: storage driver (.+?) is not supported, only the following ones are supported: (.+?)","errorType":"validation","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"make/photon/prepare/utils/configs.py","lineNumber":49,"sourceCode":"            raise Exception(\"Error: The protocol is https but attribute ssl_cert is not set\")\n        if not conf.get(\"cert_key_path\") or conf['cert_key_path'] == default_https_key_path:\n            raise Exception(\"Error: The protocol is https but attribute ssl_cert_key is not set\")\n    if protocol == \"http\":\n        logging.warning(\"WARNING: HTTP protocol is insecure. Harbor will deprecate http protocol in the future. Please make sure to upgrade to https\")\n\n    # log endpoint validate\n    if ('log_ep_host' in conf) and not conf['log_ep_host']:\n        raise Exception('Error: must set log endpoint host to enable external host')\n    if ('log_ep_port' in conf) and not conf['log_ep_port']:\n        raise Exception('Error: must set log endpoint port to enable external host')\n    if ('log_ep_protocol' in conf) and (conf['log_ep_protocol'] not in ['udp', 'tcp']):\n        raise Exception(\"Protocol in external log endpoint must be one of 'udp' or 'tcp' \")\n\n    # Storage validate\n    valid_storage_drivers = [\"filesystem\", \"azure\", \"gcs\", \"s3\", \"swift\", \"oss\"]\n    storage_provider_name = conf.get(\"storage_provider_name\")\n    if storage_provider_name not in valid_storage_drivers:\n        raise Exception(\"Error: storage driver %s is not supported, only the following ones are supported: %s\" % (\n            storage_provider_name, \",\".join(valid_storage_drivers)))\n\n    # original is registry_storage_provider_config\n    storage_provider_config = conf.get(\"storage_provider_config\")\n    if storage_provider_name != \"filesystem\":\n        if storage_provider_config == \"\":\n            raise Exception(\n                \"Error: no provider configurations are provided for provider %s\" % storage_provider_name)\n    # ca_bundle validate\n    if conf.get('registry_custom_ca_bundle_path'):\n        registry_custom_ca_bundle_path = conf.get('registry_custom_ca_bundle_path') or ''\n        if registry_custom_ca_bundle_path.startswith('/data/'):\n            ca_bundle_host_path = registry_custom_ca_bundle_path\n        else:\n            ca_bundle_host_path = os.path.join(host_root_dir, registry_custom_ca_bundle_path.lstrip('/'))\n        try:\n            uid = os.stat(ca_bundle_host_path).st_uid\n            st_mode = os.stat(ca_bundle_host_path).st_mode","sourceCodeStart":31,"sourceCodeEnd":67,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/make/photon/prepare/utils/configs.py#L31-L67","documentation":"Thrown by validate() in make/photon/prepare/utils/configs.py when storage_provider_name is not one of filesystem, azure, gcs, s3, swift, oss. These are the Docker Distribution storage backends Harbor can render into the registry config. Note: in the harbor.yml flow the parser itself only assigns these exact names (defaulting to 'filesystem'), so this branch fires when validate() is called on a dict whose provider name is missing (None) or mistyped — typically from scripts/tests that build the conf dict by hand; the legacy harbor.cfg variant of the same message (misc.py:44) fires on typos in registry_storage_provider_name.","triggerScenarios":"Calling utils.configs.validate(conf) directly with conf['storage_provider_name'] unset or misspelled; in the legacy harbor.cfg flow, registry_storage_provider_name = S3 / FileSystem / minio. A None provider (key absent) also raises, which is how direct API callers hit it.","commonSituations":"Custom deployment tooling that wraps Harbor's prepare; harbor.cfg-era configs; users assuming arbitrary S3-compatible backends (minio, ceph) are separate drivers.","solutions":["Use one of the exact lowercase names: filesystem, azure, gcs, s3, swift, oss","For S3-compatible endpoints (minio, ceph, wasabi) choose 's3' and set regionendpoint in the provider config","If you do not need object storage, remove the storage_service provider section so 'filesystem' applies","Re-run prepare and confirm the registry config renders"],"exampleFix":"# hand-built conf / legacy harbor.cfg (before)\nconf['storage_provider_name'] = 'S3'\n\n# after\nconf['storage_provider_name'] = 's3'  # minio/ceph also use 's3'","handlingStrategy":"validation","validationCode":"VALID = {'filesystem', 'azure', 'gcs', 's3', 'swift', 'oss'}\nname = conf.get('storage_provider_name')\nif name not in VALID:\n    raise SystemExit('storage driver %r not supported; use one of %s' % (name, sorted(VALID)))","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Driver names are case-sensitive lowercase identifiers","S3-compatible services are configured under 's3', not their own driver","When calling validate() programmatically, always set storage_provider_name explicitly"],"tags":["harbor","storage","registry","configuration","validation"],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}