{"record":{"id":"5688768ae2b5bb59","repo":"cli/cli","slug":"errnotfound","errorCode":"ErrNotFound","errorMessage":"secret not found in keyring","messagePattern":"secret not found in keyring","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/keyring/keyring.go","lineNumber":11,"sourceCode":"// Package keyring is a simple wrapper that adds timeouts to the zalando/go-keyring package.\npackage keyring\n\nimport (\n\t\"errors\"\n\t\"time\"\n\n\t\"github.com/zalando/go-keyring\"\n)\n\nvar ErrNotFound = errors.New(\"secret not found in keyring\")\n\ntype TimeoutError struct {\n\tmessage string\n}\n\nfunc (e *TimeoutError) Error() string {\n\treturn e.message\n}\n\n// Set secret in keyring for user.\nfunc Set(service, user, secret string) error {\n\tch := make(chan error, 1)\n\tgo func() {\n\t\tdefer close(ch)\n\t\tch <- keyring.Set(service, user, secret)\n\t}()\n\tselect {\n\tcase err := <-ch:","sourceCodeStart":1,"sourceCodeEnd":29,"githubUrl":"https://github.com/cli/cli/blob/0eeec0b92edbe70199f9768522f831d3534f41ad/internal/keyring/keyring.go#L1-L29","documentation":"ParseURL accepts only http and https URLs; any other scheme (ssh://, git://, file://, or scheme-less text) is rejected with this message. The check runs after net/url parsing succeeds, so the value is a parseable URL, just not a web one.","triggerScenarios":"Passing 'git@github.com:owner/repo/pull/123' (SSH syntax) or 'github.com/owner/repo/pull/123' (no scheme) where a PR URL is expected; also ssh://git@github.com/... forms.","commonSituations":"Users copying the SSH remote URL and appending /pull/N; scripts converting remote URLs to PR links incorrectly; paste from `git remote get-url origin` (SSH form) instead of the browser bar.","solutions":["Use the HTTPS form: https://github.com/OWNER/REPO/pull/NUMBER.","Normalize SSH URLs before passing: strip 'git@' and convert 'owner/repo.git' path style to https.","Prefer plain PR numbers or OWNER/REPO#N references, which the finder also supports."],"exampleFix":"# before\ngh pr view \"git@github.com:acme/widgets/pull/123\"  # invalid scheme\n\n# after\ngh pr view \"https://github.com/acme/widgets/pull/123\"","handlingStrategy":"validation","validationCode":"func isHTTPS(urlStr string) bool {\n    u, err := url.Parse(urlStr)\n    return err == nil && (u.Scheme == \"https\" || u.Scheme == \"http\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass https:// PR URLs.","Normalize SSH remote URLs (git@host:o/r, ssh://git@host/o/r) to https before use."],"tags":["validation","url","scheme","user-input"],"backgroundTag":null,"analyzedSha":"0eeec0b92edbe70199f9768522f831d3534f41ad","analyzedAt":"2026-08-15T12:31:05.478Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}