{"record":{"id":"5e5ca0d19681a209","repo":"nektos/act","slug":"failed-to-fetch-s-version-s-w","errorCode":null,"errorMessage":"failed to fetch \"%s\" version \"%s\": %w","messagePattern":"failed to fetch \"(.+?)\" version \"(.+?)\": %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/runner/step_action_remote.go","lineNumber":75,"sourceCode":"\t\t\treturn nil\n\t\t}\n\n\t\tfor _, action := range sar.RunContext.Config.ReplaceGheActionWithGithubCom {\n\t\t\tif strings.EqualFold(fmt.Sprintf(\"%s/%s\", sar.remoteAction.Org, sar.remoteAction.Repo), action) {\n\t\t\t\tsar.remoteAction.URL = \"https://github.com\"\n\t\t\t\tgithub.Token = sar.RunContext.Config.ReplaceGheActionTokenWithGithubCom\n\t\t\t}\n\t\t}\n\t\tif sar.RunContext.Config.ActionCache != nil {\n\t\t\tcache := sar.RunContext.Config.ActionCache\n\n\t\t\tvar err error\n\t\t\tsar.cacheDir = fmt.Sprintf(\"%s/%s\", sar.remoteAction.Org, sar.remoteAction.Repo)\n\t\t\trepoURL := sar.remoteAction.URL + \"/\" + sar.cacheDir\n\t\t\trepoRef := sar.remoteAction.Ref\n\t\t\tsar.resolvedSha, err = cache.Fetch(ctx, sar.cacheDir, repoURL, repoRef, github.Token)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"failed to fetch \\\"%s\\\" version \\\"%s\\\": %w\", repoURL, repoRef, err)\n\t\t\t}\n\n\t\t\tremoteReader := func(ctx context.Context) actionYamlReader {\n\t\t\t\treturn func(filename string) (io.Reader, io.Closer, error) {\n\t\t\t\t\tspath := path.Join(sar.remoteAction.Path, filename)\n\t\t\t\t\tfor i := 0; i < maxSymlinkDepth; i++ {\n\t\t\t\t\t\ttars, err := cache.GetTarArchive(ctx, sar.cacheDir, sar.resolvedSha, spath)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn nil, nil, os.ErrNotExist\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttreader := tar.NewReader(tars)\n\t\t\t\t\t\theader, err := treader.Next()\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturn nil, nil, os.ErrNotExist\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif header.FileInfo().Mode()&os.ModeSymlink == os.ModeSymlink {\n\t\t\t\t\t\t\tspath, err = symlinkJoin(spath, header.Linkname, \".\")\n\t\t\t\t\t\t\tif err != nil {","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/runner/step_action_remote.go#L57-L93","documentation":"The action cache (configured via Config.ActionCache) failed to fetch the remote action repository at the given URL and ref. cache.Fetch resolves the repo/ref to a commit (cloning or API lookup depending on the implementation); any underlying git/network failure is wrapped with the repo URL and requested ref for context.","triggerScenarios":"act runs with an ActionCache enabled (e.g. the Go-git-backed cache) and the fetch of 'https://github.com/{org}/{repo}' at ref (tag/branch/SHA) fails: network offline, DNS failure, private repo without a valid token, non-existent ref, or GitHub rate limiting.","commonSituations":"Running act without network access or behind a proxy; private action repos where GITHUB_TOKEN lacks access; typo'd tag (v5 when only v4 exists); rate-limited unauthenticated API; self-hosted GitHub with wrong server URL config.","solutions":["Check the wrapped error for the cause: 401/403 means token scope, 'could not read Username' means auth missing for a private repo, timeout/DNS means network.","Pass a valid token: `act -s GITHUB_TOKEN=...` or the configured token input for private actions.","Verify the ref exists on the target repository (tag spelled correctly, branch not deleted).","For offline runs use `--action-offline-mode` after warming the cache once online; check proxy env vars (HTTP_PROXY/HTTPS_PROXY) reach github.com."],"exampleFix":"# before: act push   (private action, no token)\n# after\nact push -s GITHUB_TOKEN=ghp_xxxx","handlingStrategy":"retry","validationCode":"# pre-flight reachability + auth check\ncurl -fsS -H \"Authorization: Bearer $GITHUB_TOKEN\" \\\n  https://api.github.com/repos/org/action/commits/v4 >/dev/null \\\n  && echo ref-ok || echo 'ref missing or auth/network problem'","typeGuard":null,"tryCatchPattern":"err := step.Prepare()(ctx)\nif err != nil && strings.Contains(err.Error(), \"failed to fetch\") {\n  // transient network/rate-limit: backoff and retry once\n  time.Sleep(5 * time.Second)\n  err = step.Prepare()(ctx)\n}","preventionTips":["Always pass GITHUB_TOKEN for private actions.","Warm the action cache once while online; then use --action-offline-mode.","Ensure HTTP(S)_PROXY settings are correct in sandboxes."],"tags":["network","action-cache","git","authentication","fetch"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}