{"record":{"id":"935ffb20b4f4309d","repo":"argoproj/argo-workflows","slug":"key-unsupported-git-artifact-does-not-have-a-key","errorCode":null,"errorMessage":"key unsupported: git artifact does not have a key","messagePattern":"key unsupported: git artifact does not have a key","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/apis/workflow/v1alpha1/workflow_types.go","lineNumber":2984,"sourceCode":"\t// DisableSubmodules disables submodules during git clone\n\tDisableSubmodules bool `json:\"disableSubmodules,omitempty\" protobuf:\"varint,9,opt,name=disableSubmodules\"`\n\n\t// SingleBranch enables single branch clone, using the `branch` parameter\n\tSingleBranch bool `json:\"singleBranch,omitempty\" protobuf:\"varint,10,opt,name=singleBranch\"`\n\n\t// Branch is the branch to fetch when `SingleBranch` is enabled\n\tBranch string `json:\"branch,omitempty\" protobuf:\"bytes,11,opt,name=branch\"`\n\n\t// InsecureSkipTLS disables server certificate verification resulting in insecure HTTPS connections\n\tInsecureSkipTLS bool `json:\"insecureSkipTLS,omitempty\" protobuf:\"varint,12,opt,name=insecureSkipTLS\"`\n}\n\nfunc (g *GitArtifact) HasLocation() bool {\n\treturn g != nil && g.Repo != \"\"\n}\n\nfunc (g *GitArtifact) GetKey() (string, error) {\n\treturn \"\", fmt.Errorf(\"key unsupported: git artifact does not have a key\")\n}\n\nfunc (g *GitArtifact) SetKey(string) error {\n\treturn fmt.Errorf(\"key unsupported: cannot set key on git artifact\")\n}\n\nfunc (g *GitArtifact) GetDepth() int {\n\tif g == nil || g.Depth == nil {\n\t\treturn 0\n\t}\n\treturn int(*g.Depth)\n}\n\n// ArtifactoryAuth describes the secret selectors required for authenticating to artifactory\ntype ArtifactoryAuth struct {\n\t// UsernameSecret is the secret selector to the repository username\n\tUsernameSecret *apiv1.SecretKeySelector `json:\"usernameSecret,omitempty\" protobuf:\"bytes,1,opt,name=usernameSecret\"`\n","sourceCodeStart":2966,"sourceCodeEnd":3002,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/pkg/apis/workflow/v1alpha1/workflow_types.go#L2966-L3002","documentation":"GitArtifact.GetKey always returns this error: a git artifact is cloned wholesale from a repo and has no single storage key, unlike s3-style artifacts. Any code path that calls GetKey on a git artifact gets this unconditional rejection.","triggerScenarios":"Thrown at pkg/apis/workflow/v1alpha1/workflow_types.go:2984 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Do not request a key for git artifacts; use repo/revision instead","Switch to an artifact type that supports keys (s3, gcs, azure, oss) if key-based access is required"],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}