{"record":{"id":"200dc4a8874ca3a4","repo":"argoproj/argo-workflows","slug":"failed-to-checkout-q-w","errorCode":null,"errorMessage":"failed to checkout %q: %w","messagePattern":"failed to checkout %q: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"workflow/artifacts/git/git.go","lineNumber":189,"sourceCode":"\n\tif a.Revision != \"\" {\n\t\trefSpecs := []config.RefSpec{\"refs/heads/*:refs/heads/*\"}\n\t\tif a.SingleBranch {\n\t\t\trefSpecs = []config.RefSpec{config.RefSpec(fmt.Sprintf(\"refs/heads/%s:refs/heads/%s\", a.Branch, a.Branch))}\n\t\t}\n\t\topts := &git.FetchOptions{Auth: auth, RefSpecs: refSpecs, InsecureSkipTLS: g.InsecureSkipTLS}\n\t\tif err := opts.Validate(); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to validate fetch %v: %w\", refSpecs, err)\n\t\t}\n\t\tif err := r.Fetch(opts); isFetchErr(err) {\n\t\t\treturn fmt.Errorf(\"failed to fetch %v: %w\", refSpecs, err)\n\t\t}\n\t\th, err := r.ResolveRevision(plumbing.Revision(a.Revision))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to get resolve revision: %w\", err)\n\t\t}\n\t\tif err := w.Checkout(&git.CheckoutOptions{Hash: plumbing.NewHash(h.String())}); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to checkout %q: %w\", h, err)\n\t\t}\n\t}\n\tif !a.DisableSubmodules {\n\t\ts, err := w.Submodules()\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to get submodules: %w\", err)\n\t\t}\n\t\tif err := s.Update(&git.SubmoduleUpdateOptions{\n\t\t\tInit:              true,\n\t\t\tRecurseSubmodules: git.DefaultSubmoduleRecursionDepth,\n\t\t\tAuth:              auth,\n\t\t}); err != nil {\n\t\t\treturn fmt.Errorf(\"failed to update submodules: %w\", err)\n\t\t}\n\t}\n\treturn nil\n}\n","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/workflow/artifacts/git/git.go#L171-L207","documentation":"After resolving the revision to a hash, git checkout of that commit failed in the work tree — typically dirty state, deleted paths, or an invalid hash. This is the final step of pinning the artifact repo to the requested revision.","triggerScenarios":"Thrown at workflow/artifacts/git/git.go:189 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure the revision resolves to a valid commit reachable in the clone","Retry after clearing the artifact git cache"],"exampleFix":null,"handlingStrategy":"retry","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"}