go: x/mobile/cmd/gomobile: gomobile version shows error

What version of Go are you using (go version)?

go1.13 darwin/amd64

$ go version

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/chris/Library/Caches/go-build"
GOENV="/Users/chris/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/chris/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/chris/go/src/github.com/lightningnetwork/lnd/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/rp/f7xqr7490tb5_98n7cjvxsx80000gn/T/go-build815709937=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

ran gomobile version after go get golang.org/x/mobile/cmd/gomobile go init

What did you expect to see?

the version number

What did you see instead?

gomobile version gomobile version unknown: mobile repo git log failed: exit status 128, fatal: not a git repository (or any of the parent directories): .git

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 15 (5 by maintainers)

Most upvoted comments

Maybe try go get golang.org/x/mobile/cmd/gomobile again from outside any directory that has go.mod. Then run gomobile version from any path. It could be you have to rebuild the binary because it wasn’t installed correctly the first time (e.g. fetched from a directory that has go.mod in it).

Again try GO111MODULE=off gomobile version

Or go to an empty directory and run gomobile version. From your go env output, I guess the go command is operating in module mode due to the presence of a go.mod file.

This time, try to avoid copy and paste. Seems like the copy-and-paste inserted extra characters like non-breaking space characters.