{"record":{"id":"5301033a868bbca2","repo":"GoogleContainerTools/skaffold","slug":"failed-to-copy-valuesfile-from-gcs-w","errorCode":null,"errorMessage":"failed to copy valuesFile from GCS: %w","messagePattern":"failed to copy valuesFile from GCS: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/skaffold/helm/args.go","lineNumber":188,"sourceCode":"\t\tcustomMap[\"DIGEST_HEX\"] = names[1]\n\t} else {\n\t\tcustomMap[\"DIGEST_HEX\"] = digest\n\t}\n\n\t// IMAGE_DOMAIN and IMAGE_REPO_NO_DOMAIN added for v2beta* 'helm+explicitRegistry' -> v3alpha* and beyond compatibility\n\tcustomMap[\"IMAGE_DOMAIN\"] = ref.Domain\n\tcustomMap[\"IMAGE_REPO_NO_DOMAIN\"] = strings.TrimPrefix(ref.BaseName, ref.Domain+\"/\")\n\tcustomMap[\"IMAGE_FULLY_QUALIFIED\"] = digest\n\treturn customMap\n}\n\n// Copy the value file from the GCS bucket if it starts with gs://\nfunc extractValueFileFromGCS(v, tempDir string, gcs gcs.Gsutil) (string, error) {\n\t// get a filename from gcs\n\ttempValueFile := filepath.Join(tempDir, path.Base(v))\n\n\tif err := gcs.Copy(context.TODO(), v, tempValueFile, false); err != nil {\n\t\treturn \"\", fmt.Errorf(\"failed to copy valuesFile from GCS: %w\", err)\n\t}\n\n\treturn tempValueFile, nil\n}\n","sourceCodeStart":170,"sourceCodeEnd":193,"githubUrl":"https://github.com/GoogleContainerTools/skaffold/blob/a1189de023efc32d4b8e11f395acc678aa555011/pkg/skaffold/helm/args.go#L170-L193","documentation":"Skaffold's Helm deployer downloads a values file when a helm values entry is a gs:// URI instead of a local path. extractValueFileFromGCS calls gcs.Gsutil.Copy to fetch the object into a temp dir; if that copy fails it wraps the underlying error with this message. It means the values file could not be retrieved from Google Cloud Storage before helm args were constructed.","triggerScenarios":"A values.yaml path in helm releases config starts with gs:// and gcs.Copy fails: the GCS object doesn't exist, the bucket/project lacks permission (no Cloud Storage scope or no authenticated account), gsutil/cloud SDK is not installed, network is down, or the URI is malformed.","commonSituations":"CI service account missing roles/storage.objectViewer on the bucket; running locally without `gcloud auth application-default login`; typo in bucket name or object path; firewall blocking storage.googleapis.com; using a gs:// path where a local file was intended.","solutions":["Verify the gs:// URI exists: `gsutil ls <uri>` (fix typos in bucket/object path)","Authenticate: `gcloud auth application-default login` (local) or grant the CI service account storage.objectViewer","Install/verify the Google Cloud SDK (gsutil) is on PATH","Check network/firewall access to storage.googleapis.com","If the file is local, remove the gs:// prefix and use a relative or absolute local path"],"exampleFix":"// before\nvaluesFiles:\n  - gs://my-bucket/config/prod-values.yaml\n// after\nvaluesFiles:\n  - ./charts/values/prod-values.yaml","handlingStrategy":"validation","validationCode":"// before skaffold deploy\ngsutil ls gs://my-bucket/config/prod-values.yaml || echo \"GCS object missing or no access\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Prefer committing values files locally; use gs:// only when necessary","Verify bucket access in CI with a `gsutil ls` smoke test step","Grant the CI service account roles/storage.objectViewer on values buckets","Keep the Cloud SDK installed in all Skaffold execution environments"],"tags":["gcs","helm","network","cloud-storage"],"backgroundTag":"gcs-object-copy-failed","analyzedSha":"a1189de023efc32d4b8e11f395acc678aa555011","analyzedAt":"2026-09-05T12:09:27.064Z","contentChangedAt":"2026-09-05T12:09:27.064Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}