GoogleContainerTools/skaffold · error · ConfigParsingError
parsing dependencies for skaffold config %s: %w
Error message
parsing dependencies for skaffold config %s: %w
What it means
After resolving a dependency path, Skaffold calls os.Stat on local (non-URL) dependency paths. If Stat fails with an error other than not-exist (not-exist gets its own DependencyConfigFileNotFoundErr), the stat error is wrapped in ConfigParsingError with this message. It means the dependency file exists in intent but cannot be accessed or inspected by the process.
Source
Thrown at pkg/skaffold/parser/config.go:337
cachePath, err := cacheGCSObject(ctx, *d.GoogleCloudStorage, opts, r)
if err != nil {
return nil, sErrors.ConfigParsingError(fmt.Errorf("caching remote dependency %s: %w", d.GoogleCloudStorage.Path, err))
}
path = cachePath
isRemoteCfg = true
}
if path == "" {
// empty path means configs in the same file
path = cfgOpts.file
}
if !util.IsURL(path) {
fi, err := os.Stat(path)
if err != nil {
if errors.Is(err, os.ErrNotExist) {
return nil, sErrors.DependencyConfigFileNotFoundErr(path, cfgOpts.file, err)
}
return nil, sErrors.ConfigParsingError(fmt.Errorf("parsing dependencies for skaffold config %s: %w", cfgOpts.file, err))
}
if fi.IsDir() {
path = filepath.Join(path, "skaffold.yaml")
}
}
// if the current and previous configuration files are the same, then current config should be treated as a dependency config if the previous config was also a dependency config.
// Otherwise the current config is always a dependency config if the file path is different than the previous.
cfgOpts.isDependency = cfgOpts.isDependency || path != cfgOpts.file
cfgOpts.file = path
cfgOpts.selection = d.Names
cfgOpts.isRemote = isRemoteCfg
depConfigs, _, err := getConfigs(ctx, cfgOpts, opts, r)
if err != nil {
return nil, err
}
return depConfigs, nil
}View on GitHub (pinned to a1189de023)
Solutions
- Check permissions: ls -l <path> and the parent directories; fix with chmod/chown or run as a user with access
- Confirm the path is accessible from the environment skaffold runs in (container user, mount is mounted)
- Re-run to rule out a transient I/O error
- If the file is actually missing, fix the path so the correct not-found error path applies instead
Example fix
// before requires: - path: /secure/configs/skaffold.yaml # 0600 root-owned // after chmod 644 /secure/configs/skaffold.yaml # or copy it into the repo requires: - path: ./configs/skaffold.yaml
Defensive patterns
Strategy: validation
Validate before calling
for p in $(yq '.requires[].path' skaffold.yaml); do [ -r "$p" ] || echo "unreadable dependency: $p" done
Prevention
- Check file and parent-directory read permissions for the user running skaffold
- Keep dependency configs inside the repo with normal 0644 permissions
- In containers, run as a UID that owns or can read mounted config volumes
- Verify mounts (NFS/USB) are up before running pipelines
When it happens
Trigger: processEachDependency stats a local dependency path that yields a non-ErrNotExist error: permission denied on the file or a parent directory, an I/O error, path too long, or the path being a broken special file.
Common situations: A dependency skaffold.yaml owned by another user with 0600 permissions; read-protected parent directories in multi-module repos; NFS/USB mount dropped; running skaffold in a container as a different UID.
Related errors
- writing %q to %q: %w
- reading .dockerignore: %w
- walking workspace: %w
- unable to stat file %q: %w
- failed to create directory: %v
AI-assisted analysis of GoogleContainerTools/skaffold@a1189de023 (2026-09-05).
Data as JSON: /api/errors/ac5ee239ab26de2c.
Report an issue: GitHub.