kubernetes/kops · error

%s

Error message

%s

What it means

Generic aggregation formatter in CreateValidScalewayProfile: the individual credential errors collected by checkCredentials are combined with k8serrors.NewAggregate and re-formatted with "%s" (the profile name from SCW_PROFILE env is typically appended in the surrounding message construction). It fires only when one or more of access key, secret key, or project ID are missing from the merged profile.

Source

Thrown at upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go:98

		profileFromEnv.DefaultProjectID = &projectID
	}

	// We merge the profiles: the environment will override the values from the profile
	if profileFromScwConfig == nil {
		profile = profileFromEnv
	} else {
		profile = *scw.MergeProfiles(profileFromScwConfig, &profileFromEnv)
	}

	// We check that the profile has an access key, a secret key and a default project ID
	if errList := checkCredentials(fi.ValueOf(profile.AccessKey), fi.ValueOf(profile.SecretKey), fi.ValueOf(profile.DefaultProjectID)); errList != nil {
		errMsg := k8serrors.NewAggregate(errList).Error()
		if scwProfileName := os.Getenv("SCW_PROFILE"); scwProfileName != "" {
			errMsg += fmt.Sprintf(" in profile %q", scwProfileName)
		} else {
			errMsg += " in a Scaleway profile or as an environment variable"
		}
		return nil, fmt.Errorf("%s", errMsg)
	}

	return &profile, nil
}

View on GitHub (pinned to 4c8573c808)

Solutions

  1. Read the aggregated message: it lists each missing credential
  2. Set all of SCW_ACCESS_KEY, SCW_SECRET_KEY, SCW_DEFAULT_PROJECT_ID or complete the profile in the config file
  3. Run 'scw init' for a fully populated profile
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at upup/pkg/fi/cloudup/scaleway/scalewaymetadata/profile.go:98 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of kubernetes/kops@4c8573c808 (2026-09-05). Data as JSON: /api/errors/865617b17ccc52db. Report an issue: GitHub.