rancher / trash

Minimalistic Go vendored code manager
MIT License
294 stars 57 forks source link

Cannot vendor k8s httplog #73

Open FrenchBen opened 7 years ago

FrenchBen commented 7 years ago

Sample code:

package main

import (
    "io/ioutil"
    "os"

    _ "k8s.io/kubernetes/pkg/client/metrics/prometheus" // for client metric registration
    "k8s.io/kubernetes/pkg/kubectl/cmd"
    cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
    _ "k8s.io/kubernetes/pkg/version/prometheus" // for version metric registration

    "github.com/spf13/cobra/doc"
)

func main() {
    kubectl := cmd.NewKubectlCommand(cmdutil.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard)
    doc.GenMarkdownTree(kubectl, "./")
}

End of trash -u output:

INFO[0318] Checking out 'k8s.io/apiserver/pkg/httplog', commit: 'master'
INFO[0318] Fetching latest commits from 'origin' for 'k8s.io/apiserver/pkg/httplog'
ERRO[0318] `git fetch -f -t origin` failed:
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

FATA[0318] fetch failed                                  i={Package:k8s.io/apiserver/pkg/httplog Version:master Repo:}
AlekSi commented 7 years ago

Try to remove trash cache: rm -fr ~/.trash-cache.

FrenchBen commented 7 years ago

That worked - Can you explain why the cache was at fault here? Perhaps there should be a purge cmd for the cache?

allingeek commented 7 years ago

I'm getting the same error message for other packages, and removing the cache doesn't help. This happens on a fresh machine without ever having had trash run before but from a repo that has been in development for some time.