GoogleContainerTools/skaffold · error · ConfigParsingError
getting GCB repo info for %s: %w
Error message
getting GCB repo info for %s: %w
What it means
When processing a remote config dependency of type GoogleCloudBuildRepoV2, skaffold queries the Cloud Build Repos v2 API (GetRepoInfo) to resolve the repository URI/clone URI. If that API call fails, the error is wrapped with the repo name and returned as a ConfigParsingError. This means the remote GCB repository reference could not be resolved.
Source
Thrown at pkg/skaffold/parser/config.go:298
var repoInfo *git.Config
configFilePath := ""
path := makeConfigPathAbsolute(d.Path, cfgOpts.file)
isRemoteCfg := false
if d.GitRepo != nil {
configFilePath = d.GitRepo.Path
repoInfo = &git.Config{
Repo: d.GitRepo.Repo,
RepoCloneURI: d.GitRepo.Repo,
Ref: d.GitRepo.Ref,
Sync: d.GitRepo.Sync,
}
}
if d.GoogleCloudBuildRepoV2 != nil {
repInf, err := gcbreposv2.GetRepoInfo(ctx, d.GoogleCloudBuildRepoV2.ProjectID, d.GoogleCloudBuildRepoV2.Region, d.GoogleCloudBuildRepoV2.Connection, d.GoogleCloudBuildRepoV2.Repo)
if err != nil {
return nil, sErrors.ConfigParsingError(fmt.Errorf("getting GCB repo info for %s: %w", d.GoogleCloudBuildRepoV2.Repo, err))
}
configFilePath = d.GoogleCloudBuildRepoV2.Path
repoInfo = &git.Config{
Repo: repInf.URI,
RepoCloneURI: repInf.CloneURI,
Ref: d.GoogleCloudBuildRepoV2.Ref,
Sync: d.GoogleCloudBuildRepoV2.Sync,
}
}
if repoInfo != nil {
cachePath, err := cacheRepo(ctx, *repoInfo, configFilePath, opts, r)
if err != nil {
return nil, sErrors.ConfigParsingError(fmt.Errorf("caching remote dependency %s: %w", repoInfo.Repo, err))
}
path = cachePath
isRemoteCfg = true
}View on GitHub (pinned to a1189de023)
Solutions
- Verify the dependency fields (projectID, region, connection, repo) against the actual GCB v2 repo in the console/gcloud
- Authenticate and check IAM: gcloud auth application-default login and ensure cloudbuild.repositories.get permission
- Test resolution manually (gcloud cloud-build repositories describe ... in the same project/region) to see the raw API error
- Fix network/proxy issues if the underlying error is a connection failure, then re-run
Example fix
// before: skaffold.yaml
dependencies:
- googleCloudBuildRepoV2:
projectID: wrong-project
repo: my-repo
// after
dependencies:
- googleCloudBuildRepoV2:
projectID: my-project
region: us-central1
connection: my-connection
repo: my-repo
ref: main Defensive patterns
Strategy: try-catch
Validate before calling
// before parsing configs with GCB dependencies
cmd := exec.Command("gcloud", "cloud-build", "repositories", "describe", dep.Repo,
"--project="+dep.ProjectID, "--region="+dep.Region, "--connection="+dep.Connection)
if err := cmd.Run(); err != nil {
return fmt.Errorf("GCB repo %s not resolvable: %w", dep.Repo, err)
} Try / catch
cfgs, err := skaffoldConfig.Parse(...)
if err != nil {
var pe *sErrors.ConfigParsingError
if errors.As(err, &pe) && strings.Contains(err.Error(), "getting GCB repo info") {
// re-auth and retry once
exec.Command("gcloud", "auth", "application-default", "login").Run()
cfgs, err = skaffoldConfig.Parse(...)
}
if err != nil { return err }
} Prevention
- Run 'gcloud auth application-default login' before working with GCB repo dependencies
- Double-check projectID/region/connection/repo values against gcloud output, not memory
- Ensure IAM grants cloudbuild.repositories.get for your account
- Test with 'gcloud cloud-build repositories describe' when parsing fails
When it happens
Trigger: gcbreposv2.GetRepoInfo fails: wrong projectID/region/connection/repo values in the dependency, missing gcloud credentials or insufficient IAM (cloudbuild.repositories.get), the repo/connection does not exist, or API/network errors.
Common situations: Typo in the repo name or connection id in skaffold.yaml dependencies; running without 'gcloud auth application-default login'; project/region mismatch with where the connection was created; deleted or renamed GCB v2 repository.
Related errors
- caching remote dependency %s: %w
- bucket name is empty
- INSPECT_PROFILE_NOT_FOUND_ERR
- cannot resolve active Kubernetes context - multiple contexts
- CONFIG_BAD_FILTER_ERR
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/02371d64b2ed9455.
Report an issue: GitHub.