MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / missing_credentials_error

Function missing_credentials_error

crates/openshell-cli/src/run.rs:4564–4587  ·  view source on GitHub ↗
(provider_type: &str)

Source from the content-addressed store, hash-verified

4562const GOOGLE_CLOUD_PROVIDER_TYPE: &str = "google-cloud";
4563
4564fn missing_credentials_error(provider_type: &str) -> miette::Report {
4565 if provider_type == VERTEX_AI_PROVIDER_TYPE {
4566 return miette::miette!(
4567 "no credentials resolved for provider type '{provider_type}'. \
4568 Set GOOGLE_VERTEX_AI_TOKEN, VERTEX_AI_TOKEN, \
4569 GOOGLE_VERTEX_AI_SERVICE_ACCOUNT_TOKEN, or VERTEX_AI_SERVICE_ACCOUNT_TOKEN; \
4570 or use --from-gcloud-adc / --from-existing with those env vars set."
4571 );
4572 }
4573
4574 if provider_type == GOOGLE_CLOUD_PROVIDER_TYPE {
4575 return miette::miette!(
4576 "no credentials resolved for provider type '{provider_type}'. \
4577 Set GCP_ADC_ACCESS_TOKEN or GCP_SA_ACCESS_TOKEN; \
4578 or use --from-gcloud-adc / --from-existing with those env vars set."
4579 );
4580 }
4581
4582 miette::miette!(
4583 "no credentials resolved for provider type '{provider_type}'. \
4584 Use --credential KEY[=VALUE], --runtime-credentials for runtime-resolved profile credentials, \
4585 or --from-existing with the appropriate env vars set."
4586 )
4587}
4588
4589#[allow(clippy::too_many_arguments)]
4590pub async fn provider_create(

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected