cli/cli · warning
ErrNotFound
ErrNotFound
Error message
secret not found in keyring
What it means
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.
Source
Thrown at internal/keyring/keyring.go:11
// Package keyring is a simple wrapper that adds timeouts to the zalando/go-keyring package.
package keyring
import (
"errors"
"time"
"github.com/zalando/go-keyring"
)
var ErrNotFound = errors.New("secret not found in keyring")
type TimeoutError struct {
message string
}
func (e *TimeoutError) Error() string {
return e.message
}
// Set secret in keyring for user.
func Set(service, user, secret string) error {
ch := make(chan error, 1)
go func() {
defer close(ch)
ch <- keyring.Set(service, user, secret)
}()
select {
case err := <-ch:View on GitHub (pinned to 0eeec0b92e)
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.
Example fix
# before gh pr view "git@github.com:acme/widgets/pull/123" # invalid scheme # after gh pr view "https://github.com/acme/widgets/pull/123"
Defensive patterns
Strategy: validation
Validate before calling
func isHTTPS(urlStr string) bool {
u, err := url.Parse(urlStr)
return err == nil && (u.Scheme == "https" || u.Scheme == "http")
} Prevention
- Always pass https:// PR URLs.
- Normalize SSH remote URLs (git@host:o/r, ssh://git@host/o/r) to https before use.
When it happens
Trigger: 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.
Common situations: 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.
Related errors
- invalid hostname
- no default host configured; run 'gh auth login'
- username cannot be blank
- agent tasks are not supported on this host
- invalid discussion URL: %q
AI-assisted analysis of cli/cli@0eeec0b92e (2026-08-15).
Data as JSON: /api/errors/5688768ae2b5bb59.
Report an issue: GitHub.