pivotal-cf / cred-alert

Scans repos for credentials and then shouts if it finds them
Apache License 2.0
114 stars 18 forks source link

Errors with initial build #5

Open ghost opened 6 years ago

ghost commented 6 years ago

I'm following the build instructions per the README.md but getting errors.

levanter:cred-alert sean$ go build cmd/cred-alert-cli can't load package: package cmd/cred-alert-cli: cannot find package "." in: /usr/local/Cellar/go/1.9.3/libexec/src/cmd/cred-alert-cli levanter:cred-alert sean$

Any thoughts?

cf-gitbot commented 6 years ago

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

ghost commented 6 years ago

Here are some more details...

` levanter:cred-alert sean$ brew install go Updating Homebrew... ==> Auto-updated Homebrew! Updated 2 taps (homebrew/core, caskroom/cask). ==> New Formulae amber libccd plank zig container-diff nyx tmux-xpanes ==> Updated Formulae sqlite ✔ gcc@5 owfs abcm2ps gegl paket abcmidi geoserver par2 acmetool git parallel amazon-ecs-cli git-ftp pdal apibuilder-cli git-town pdnsrec awscli gitlab-runner planck babl go pmd bam godep pre-commit bench goenv pyqt bind gollum quicktype bit graphicsmagick redis bitcoin gwt rgbds calabash heroku roswell chromaprint highlight shfmt clojure hugo sip cloog hyperscan snappystream cocoapods imagemagick sops conan imagemagick@6 speech-tools consul imagesnap sqldiff crowdin iron-functions sqlite-analyzer cryfs jenkins sslh cryptopp just statik curl kedge streamlink darksky-weather khard termius dbhash knot-resolver terragrunt dep kompose texmath digdag kotlin tig dlib kubernetes-helm tippecanoe dmd leaps tokei dssim leptonica tomcat dub libhttpseverywhere traefik emscripten libjwt transmission envconsul libraw unbound etcd librsvg vala etsh libtomcrypt vis faas-cli libuv wget firebase-cli libvpx whois flow mariadb-connector-c wine fn mercurial wrk folly micropython wtf freeciv mingw-w64 xml-tooling-c freeswitch mlt youtube-dl fwup nss zsh-lovers gcc openrtsp gcc@4.9 orc-tools ==> Deleted Formulae antlr@3 isl@0.14 apache-spark@1.5 jetty@8 apache-spark@1.6 jpeg@6 autoconf@2.64 juju@1.25 automake@1.12 kubernetes-cli@1.3 azure-cli@1 laszip@2 bazel@0.2 ledger@2.6 clang-format@3.8 libmpc@0.8 cloog@0.15 libpng@1.2 docker@1.11 libpqxx@3 docker@1.71 librealsense@1 eigen@3.2 libxml2@2.7 gcc@4.6 logstash@2.4 gcc@4.7 logstash@5.6 gcc@4.8 moodbar glfw@2 mpfr@2 gmp@4 open-mpi@1.6 go@1.5 percona-server@5.5 grails@2.5 perl@5.14 gsl@1 ppl@0.11 gst-plugins-bad@0.10 redis@2.6 gst-plugins-base@0.10 selenium-server-standalone@2.45 gst-plugins-good@0.10 srtp@1.6 gst-plugins-ugly@0.10 swig@2 gstreamer@0.10 unison@2.40 influxdb@0.8 zeromq@3.2 isl@0.11 zeromq@4.0 isl@0.12 zeromq@4.1

==> Downloading https://homebrew.bintray.com/bottles/go-1.9.3.high_sierra.bottle ######################################################################## 100.0% ==> Pouring go-1.9.3.high_sierra.bottle.tar.gz ==> Caveats A valid GOPATH is required to use the go get command. If $GOPATH is not specified, $HOME/go will be used by default: https://golang.org/doc/code.html#GOPATH

You may wish to add the GOROOT-based install location to your PATH: export PATH=$PATH:/usr/local/opt/go/libexec/bin ==> Summary 🍺 /usr/local/Cellar/go/1.9.3: 7,652 files, 294.0MB levanter:cred-alert sean$ which go /usr/local/bin/go levanter:cred-alert sean$ export GOPATH=$HOME/golang levanter:cred-alert sean$ export GOROOT=/usr/local/opt/go/libexec

levanter:cred-alert sean$ cd src levanter:src sean$ go build cred-alert/cmd/cred-alert-cli can't load package: package cred-alert/cmd/cred-alert-cli: cannot find package "cred-alert/cmd/cred-alert-cli" in any of: /usr/local/opt/go/libexec/src/cred-alert/cmd/cred-alert-cli (from $GOROOT) /Users/sean/golang/src/cred-alert/cmd/cred-alert-cli (from $GOPATH) levanter:src sean$

`

ghost commented 6 years ago

Getting closer here. After setting the GOROOT properly. Now I just have to install various go package dependencies.

levanter:src sean$ export GOROOT=/Users/sean/cred-alert/ levanter:src sean$ go build cred-alert/cmd/cred-alert-cli cred-alert/commands/scan.go:4:2: cannot find package "bufio" in any of: /Users/sean/cred-alert/src/bufio (from $GOROOT) /Users/sean/golang/src/bufio (from $GOPATH) bitbucket.org/taruti/mimemagic/types.go:3:8: cannot find package "bytes" in any of: /Users/sean/cred-alert/src/bytes (from $GOROOT) /Users/sean/golang/src/bytes (from $GOPATH) cred-alert/commands/scan.go:14:2: no Go files in /Users/sean/cred-alert/src/code.cloudfoundry.org/lager /Users/sean/cred-alert/src/cred-alert/mimetype/mimetype.go:8:2: non-standard import "bitbucket.org/taruti/mimemagic" in standard package "cred-alert/mimetype" cred-alert/inflator/inflator.go:6:2: cannot find package "errors" in any of: /Users/sean/cred-alert/src/errors (from $GOROOT) /Users/sean/golang/src/errors (from $GOPATH) cred-alert/inflator/inflator.go:7:2: cannot find package "fmt" in any of: /Users/sean/cred-alert/src/fmt (from $GOROOT) /Users/sean/golang/src/fmt (from $GOPATH) cred-alert/sniff/sniff.go:10:2: no Go files in /Users/sean/cred-alert/src/github.com/hashicorp/go-multierror cred-alert/commands/update.go:9:2: no Go files in /Users/sean/cred-alert/src/github.com/inconshreveable/go-update cred-alert/cmd/cred-alert-cli/main.go:8:2: no Go files in /Users/sean/cred-alert/src/github.com/jessevdk/go-flags cred-alert/commands/scan.go:12:2: no Go files in /Users/sean/cred-alert/src/github.com/kardianos/osext cred-alert/commands/colors.go:3:8: no Go files in /Users/sean/cred-alert/src/github.com/mgutz/ansi cred-alert/mimetype/mimetype.go:5:2: cannot find package "io" in any of: /Users/sean/cred-alert/src/io (from $GOROOT) /Users/sean/golang/src/io (from $GOPATH) cred-alert/inflator/inflator.go:8:2: cannot find package "io/ioutil" in any of: /Users/sean/cred-alert/src/io/ioutil (from $GOROOT) /Users/sean/golang/src/io/ioutil (from $GOPATH) cred-alert/scanners/dirscanner/dirscanner.go:11:2: cannot find package "log" in any of: /Users/sean/cred-alert/src/log (from $GOROOT) /Users/sean/golang/src/log (from $GOPATH) cred-alert/commands/update.go:6:2: cannot find package "net/http" in any of: /Users/sean/cred-alert/src/net/http (from $GOROOT) /Users/sean/golang/src/net/http (from $GOPATH) cred-alert/inflator/inflator.go:9:2: cannot find package "os" in any of: /Users/sean/cred-alert/src/os (from $GOROOT) /Users/sean/golang/src/os (from $GOPATH) cred-alert/inflator/inflator.go:10:2: cannot find package "os/exec" in any of: /Users/sean/cred-alert/src/os/exec (from $GOROOT) /Users/sean/golang/src/os/exec (from $GOPATH) cred-alert/commands/scan.go:9:2: cannot find package "os/signal" in any of: /Users/sean/cred-alert/src/os/signal (from $GOROOT) /Users/sean/golang/src/os/signal (from $GOPATH) cred-alert/inflator/inflator.go:11:2: cannot find package "path/filepath" in any of: /Users/sean/cred-alert/src/path/filepath (from $GOROOT) /Users/sean/golang/src/path/filepath (from $GOPATH) cred-alert/scanners/diffscanner/diff_scanner.go:7:2: cannot find package "regexp" in any of: /Users/sean/cred-alert/src/regexp (from $GOROOT) /Users/sean/golang/src/regexp (from $GOPATH) package cred-alert/cmd/cred-alert-cli imports runtime: cannot find package "runtime" in any of: /Users/sean/cred-alert/src/runtime (from $GOROOT) /Users/sean/golang/src/runtime (from $GOPATH) cred-alert/scanners/diffscanner/diff_scanner.go:8:2: cannot find package "strconv" in any of: /Users/sean/cred-alert/src/strconv (from $GOROOT) /Users/sean/golang/src/strconv (from $GOPATH) cred-alert/mimetype/mimetype.go:6:2: cannot find package "strings" in any of: /Users/sean/cred-alert/src/strings (from $GOROOT) /Users/sean/golang/src/strings (from $GOPATH) cred-alert/commands/scan.go:10:2: cannot find package "time" in any of: /Users/sean/cred-alert/src/time (from $GOROOT) /Users/sean/golang/src/time (from $GOPATH) levanter:src sean$ which dep levanter:src sean$ levanter:src sean$ go get io package io: unrecognized import path "io" (import path does not begin with hostname) levanter:src sean$