argoproj/argo-workflows · error
key unsupported: cannot set key on git artifact
Error message
key unsupported: cannot set key on git artifact
What it means
Returned when validating a git artifact whose spec sets a key field. GitArtifact has no key concept, so declaring one is a spec error — distinct from GetKey, this fires when the user supplied a key in the workflow spec.
Source
Thrown at pkg/apis/workflow/v1alpha1/workflow_types.go:2988
SingleBranch bool `json:"singleBranch,omitempty" protobuf:"varint,10,opt,name=singleBranch"`
// Branch is the branch to fetch when `SingleBranch` is enabled
Branch string `json:"branch,omitempty" protobuf:"bytes,11,opt,name=branch"`
// InsecureSkipTLS disables server certificate verification resulting in insecure HTTPS connections
InsecureSkipTLS bool `json:"insecureSkipTLS,omitempty" protobuf:"varint,12,opt,name=insecureSkipTLS"`
}
func (g *GitArtifact) HasLocation() bool {
return g != nil && g.Repo != ""
}
func (g *GitArtifact) GetKey() (string, error) {
return "", fmt.Errorf("key unsupported: git artifact does not have a key")
}
func (g *GitArtifact) SetKey(string) error {
return fmt.Errorf("key unsupported: cannot set key on git artifact")
}
func (g *GitArtifact) GetDepth() int {
if g == nil || g.Depth == nil {
return 0
}
return int(*g.Depth)
}
// ArtifactoryAuth describes the secret selectors required for authenticating to artifactory
type ArtifactoryAuth struct {
// UsernameSecret is the secret selector to the repository username
UsernameSecret *apiv1.SecretKeySelector `json:"usernameSecret,omitempty" protobuf:"bytes,1,opt,name=usernameSecret"`
// PasswordSecret is the secret selector to the repository password
PasswordSecret *apiv1.SecretKeySelector `json:"passwordSecret,omitempty" protobuf:"bytes,2,opt,name=passwordSecret"`
}
View on GitHub (pinned to 35bff19146)
Solutions
- Remove the key field from the git artifact in the spec
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at pkg/apis/workflow/v1alpha1/workflow_types.go:2988 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03).
Data as JSON: /api/errors/1f8ff3d45417fb4e.
Report an issue: GitHub.