diff --git a/context/context.go b/context/context.go index fed589a8d..385425958 100644 --- a/context/context.go +++ b/context/context.go @@ -201,9 +201,17 @@ func (c *fsContext) Remotes() (Remotes, error) { if err != nil { return nil, err } + if len(gitRemotes) == 0 { + return nil, errors.New("no git remotes found") + } + sshTranslate := git.ParseSSHConfig().Translator() c.remotes = translateRemotes(gitRemotes, sshTranslate) } + + if len(c.remotes) == 0 { + return nil, errors.New("no git remote found for a github.com repository") + } return c.remotes, nil }