{"record":{"id":"eb81140b0c745ed8","repo":"nektos/act","slug":"gogitactioncache-failed-to-create-remote-s-with-r","errorCode":null,"errorMessage":"GoGitActionCache failed to create remote %s with ref %s at %s: %w","messagePattern":"GoGitActionCache failed to create remote (.+?) with ref (.+?) at (.+?): %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/runner/action_cache.go","lineNumber":69,"sourceCode":"\t\treturn \"\", fmt.Errorf(\"GoGitActionCache failed to generate random tmp branch %s with ref %s at %s: %w\", url, ref, gitPath, err)\n\t}\n\tbranchName := hex.EncodeToString(tmpBranch)\n\n\tvar auth transport.AuthMethod\n\tif token != \"\" {\n\t\tauth = &http.BasicAuth{\n\t\t\tUsername: \"token\",\n\t\t\tPassword: token,\n\t\t}\n\t}\n\tremote, err := gogitrepo.CreateRemoteAnonymous(&config.RemoteConfig{\n\t\tName: \"anonymous\",\n\t\tURLs: []string{\n\t\t\turl,\n\t\t},\n\t})\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"GoGitActionCache failed to create remote %s with ref %s at %s: %w\", url, ref, gitPath, err)\n\t}\n\tdefer func() {\n\t\t_ = gogitrepo.DeleteBranch(branchName)\n\t}()\n\tif err := remote.FetchContext(ctx, &git.FetchOptions{\n\t\tRefSpecs: []config.RefSpec{\n\t\t\tconfig.RefSpec(ref + \":\" + branchName),\n\t\t},\n\t\tAuth:  auth,\n\t\tForce: true,\n\t\tDepth: 1,\n\t}); err != nil {\n\t\treturn \"\", fmt.Errorf(\"GoGitActionCache failed to fetch %s with ref %s at %s: %w\", url, ref, gitPath, err)\n\t}\n\thash, err := gogitrepo.ResolveRevision(plumbing.Revision(branchName))\n\tif err != nil {\n\t\treturn \"\", fmt.Errorf(\"GoGitActionCache failed to resolve sha %s with ref %s at %s: %w\", url, ref, gitPath, err)\n\t}","sourceCodeStart":51,"sourceCodeEnd":87,"githubUrl":"https://github.com/nektos/act/blob/4f411281417e88660bea1c1a1749aa71ae0bd60f/pkg/runner/action_cache.go#L51-L87","documentation":"Fetch then calls gogitrepo.CreateRemoteAnonymous with a RemoteConfig named 'anonymous' and URLs: [url]. This error wraps a go-git error creating that anonymous remote — typically an invalid repository URL (bad scheme, unsupported protocol like ssh without support compiled in) or an invalid remote configuration.","triggerScenarios":"The 'uses:' reference resolves to a URL go-git cannot parse as a remote: malformed URL, unsupported scheme (e.g. git@... SSH URL where only https is expected), or a URL with invalid characters. Also fires if the repository config in the bare cache repo is corrupt.","commonSituations":"Workflow 'uses: org/repo/path@ref' that produces a bad URL due to a typo; enterprise GitHub with a custom URL template (--env GITHUB_SERVER_URL / GITHUB_API_URL misconfigured); action referenced via an SSH-style URL.","solutions":["Check the action/workflow 'uses:' string is well-formed: {owner}/{repo}[/{path}]@{ref} over HTTPS.","If using GitHub Enterprise, verify GITHUB_SERVER_URL/GITHUB_API_URL env vars point to a valid HTTPS endpoint.","Clear the bare cache repo directory named in the error in case its config is corrupt: rm -rf <gitPath>.","Update go-git/act — older versions reject URL forms that newer ones accept."],"exampleFix":"# before (workflow)\nuses: git@github.com:org/repo/.github/actions/my-action@v1\n\n# after\nuses: org/repo/.github/actions/my-action@v1","handlingStrategy":"validation","validationCode":"# sanity-check that the action URL go-git will use is parseable\ngit ls-remote https://github.com/{owner}/{repo} HEAD >/dev/null && echo url-ok","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep 'uses:' in canonical {owner}/{repo}[/{path}]@{ref} HTTPS form.","Set GITHUB_SERVER_URL/GITHUB_API_URL correctly for GitHub Enterprise.","Avoid SSH-style git@ URLs in uses:."],"tags":["git","url","remote","act"],"backgroundTag":null,"analyzedSha":"4f411281417e88660bea1c1a1749aa71ae0bd60f","analyzedAt":"2026-08-15T09:19:46.307Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}