[INFO] --> Parsing Godeps metadata...
[INFO] --> Fetching github.com/julienschmidt/httprouter.
[INFO] --> Setting version for github.com/julienschmidt/httprouter to b428fda53bb0a764fea9c76c9413512eda291dec.
[INFO] --> Fetching github.com/mattn/go-colorable.
[INFO] --> Fetching log.
[WARN] Unable to checkout log
[INFO] --> Fetching golang.org/x/net.
[INFO] --> Fetching github.com/mattn/go-isatty.
[INFO] --> Fetching golang.org/x/sys.
[INFO] Downloading dependencies. Please wait...
[INFO] Setting references for remaining imports
[ERROR] Failed to set version on log to : Cannot detect VCS
[ERROR] Failed to set references: Cannot detect VCS (Skip to cleanup)
glide version v0.12.3
Having what I believe is the same problem, during glide get and glide up:
[INFO] Found Godeps.json file in /Users/alex/.glide/cache/src/https-github.com-stretchr-testify
[INFO] --> Parsing Godeps metadata...
[INFO] --> Fetching updates for github.com/stretchr/objx.
[INFO] --> Setting version for github.com/stretchr/objx to cbeaeb16a013161a98496fad62933b1d21786672.
[INFO] --> Fetching updates for github.com/pmezard/go-difflib.
[INFO] --> Setting version for github.com/pmezard/go-difflib to d8ed2627bdf02c080bf22230dbb337003b7aba2d.
[INFO] --> Fetching updates for github.com/lann/builder.
[INFO] --> Fetching google/protobuf.
[WARN] Unable to checkout google/protobuf
[ERROR] Error looking for google/protobuf: Cannot detect VCS
Where does google/protobuf聽come from?
I boiled it down to some Go files in my repo (generated by Protobuf). If I stash them, glide works again. I can reproduce this consistently. They contain these imports:
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis/google/api"
import google_protobuf "google/protobuf"
import google_protobuf2 "google/protobuf"
Now, obviously the last two imports aren't correct, but why on earth is Glide reading them?
also seeing the same error as @atombender with the import statements in generated proto go files
glide reads imports to determine what dependencies are actually required. The problem is those import paths.
You can always set an ignore in glide.yaml for google/protobuf - that should address that issue, at least.
The OP's issue is stranger - are you, perhaps, running that on a machine without a GOROOT set up, somehow? (not the env var, i mean literally no stdlib)
Cannot detect VCS
[ERROR] Failed to set version on golang.org/x/net/http2 to : Cannot detect VCS
[ERROR] Failed to set references: Cannot detect VCS (Skip to cleanup)
The OP's issue is stranger - are you, perhaps, running that on a machine without a GOROOT set up, somehow? (not the env var, i mean literally no stdlib)
This was a good pointer for me. For me, glide tried to download the standard Go libs (as fmt, log, database/sql, ...) when I glided in a terminal hosted by GoLand.
When I did the same via the Windows console, it actually worked as expected. Looks like GoLand has set some ENV vars, which glide wasn't really understanding.
Most helpful comment
Cannot detect VCS
[ERROR] Failed to set version on golang.org/x/net/http2 to : Cannot detect VCS
[ERROR] Failed to set references: Cannot detect VCS (Skip to cleanup)