Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: unknown option `unshallow' when running go get #32905

Closed
joegrasse opened this issue Jul 2, 2019 · 3 comments
Closed

cmd/go: unknown option `unshallow' when running go get #32905

joegrasse opened this issue Jul 2, 2019 · 3 comments

Comments

@joegrasse
Copy link

@joegrasse joegrasse commented Jul 2, 2019

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

$ go version
go version go1.12.6 linux/386

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

CentOS 6.10

go env Output
$ go env
GOARCH="386"
GOBIN=""
GOCACHE="/usr2/shared/graj04/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="386"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/usr2/ps/isp/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_386"
GCCGO="gccgo"
GO386="sse2"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m32 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build693494323=/tmp/go-build"

What did you do?

go get -u golang.org/x/tools/gopls@latest

What did you expect to see?

Successful download/install of gopls using modules.

What did you see instead?

go: golang.org/x/tools@v0.0.0-20190628153133-6cdbf07be9d0: git -c protocol.version=0 fetch --unshallow -f https://go.googlesource.com/tools refs/heads/*:refs/heads/* refs/tags/*:refs/tags/* in /usr2/ps/isp/go/pkg/mod/cache/vcs/b44680b3c3708a854d4c89f55aedda0b223beb8d9e30fba969cefb5bd9c1e843: exit status 129:
        error: unknown option `unshallow'
        usage: git fetch [<options>] [<repository> [<refspec>...]]
           or: git fetch [<options>] <group>
           or: git fetch --multiple [<options>] [(<repository> | <group>)...]
           or: git fetch --all [<options>]

            -v, --verbose         be more verbose
            -q, --quiet           be more quiet
            --all                 fetch from all remotes
            -a, --append          append to .git/FETCH_HEAD instead of overwriting
            --upload-pack <path>  path to upload pack on remote end
            -f, --force           force overwrite of local branch
            -m, --multiple        fetch from multiple remotes
            -t, --tags            fetch all tags and associated objects
            -n                    do not fetch all tags (--no-tags)
            -p, --prune           prune remote-tracking branches no longer on remote
            --recurse-submodules[=<on-demand>]
                                  control recursive fetching of submodules
            --dry-run             dry run
            -k, --keep            keep downloaded pack
            -u, --update-head-ok  allow updating of HEAD ref
            --progress            force progress reporting
            --depth <depth>       deepen history of shallow clone
go get: error loading module requirements

Looks like the version of Git that can be installed with CentOS 6.10 doesn't support unshallow.

@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Jul 2, 2019

Duplicate of #28550

@bcmills bcmills marked this as a duplicate of #28550 Jul 2, 2019
@bcmills bcmills closed this Jul 2, 2019
@bcmills

This comment has been minimized.

Copy link
Member

@bcmills bcmills commented Jul 2, 2019

As a workaround, note that you can set GOPROXY=https://proxy.golang.org to fetch using HTTPS instead of Git.

@thepudds

This comment has been minimized.

Copy link

@thepudds thepudds commented Jul 3, 2019

@joegrasse Three quick questions for you:

  1. How feasible is it to upgrade CentOS versions on your development machines?

  2. How feasible is it to instead install a more modern version of git on your development machines? Even if that might not be desirable, is it more feasible than upgrading CentOS itself?

  3. Does the GOPROXY workaround work for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.