-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: "fatal: git fetch-pack: expected shallow list" when retrieving earlier version of already installed package on CentOS 7. #38373
Comments
this looks like the |
Also, see reposurgeon bug #272: https://gitlab.com/esr/reposurgeon/-/issues/272 |
Strange thing is if I manually create a shallow clone, git fetch --unshallow works fine. I'm not sure what is different about the shallow clones that go retrieves vs. the following: $ git version git version 1.8.3.1 $ git clone --depth 1 --bare https://go.googlesource.com/arch Cloning into bare repository 'arch.git'... remote: Counting objects: 144, done remote: Finding sources: 100% (144/144) remote: Total 144 (delta 11), reused 129 (delta 11) Receiving objects: 100% (144/144), 768.76 KiB | 0 bytes/s, done. Resolving deltas: 100% (11/11), done. $ cd arch.git $ git log --all --oneline ff8b605 vendor: delete $ git fetch --unshallow -f https://go.googlesource.com/arch remote: Total 614 (delta 228), reused 614 (delta 228) Receiving objects: 100% (614/614), 1.47 MiB | 0 bytes/s, done. Resolving deltas: 100% (228/228), done. From https://go.googlesource.com/arch * branch HEAD -> FETCH_HEAD $ git log --all --oneline ff8b605 vendor: delete 69f17b2 vendor: migrate from govendor to go mod vendor 368ea8f x86asm: add support for FLDZ and FLDLN2 a0d8588 arm64/arm64asm: rename NOP instruction as NOOP in go syntax 4e8777c arm64/arm64gen: get system register readable and writeable attribute 1137aed arm64/arm64gen: adds a generator sysreggen.go [...snip...] |
Also, old |
FYI, previous issues mentioned problems on CentOS 5 & CentOS 6. CentOS 5 is no longer supported, and CentOS 6 is reaching end-of-life later this year, but CentOS 7 is being supported until 2024. |
I just ran into this issue on CentOS 7.8 (released September 24, 2019), with
I resolved this by uninstalling go 1.13.6 via |
Faced with the same issues go version and git version are the same, env GO111MODULE=on go run build/ci.go install ./cmd/geth |
Same issue here, same solution: remove EPEL's go 1.13 and install 1.14 directly from the vendor:
|
Same issue! Unfortunately old platforms (and BTW Centos7 is not THAT old) are still vital in enterprise environment where stability is required, the suggestion to update git is a valid one but it really hamper down the velocity and ergonomics of go. |
We have had similar issues running Bitbucket on RHEL7 in production needing a later version of the Git client. We have always found the IUS version to be very stable for production. Go to https://repo.ius.io/ to learn more. Here are the basic steps to get the newer version of Git on Centos7/RHEL7:
After updating to Git 2.2.2 the |
I ran into the same error on OEL7 (RHEL-based) with git 2.24.0 and go 1.15.2. The error I ran into resulted from the gh cli installer. I ran To fix it, I then ran:
Looks like it's possible related to |
…HEL 7 Our Dockerfile uses GOPROXY=direct, which makes "go mod" commands use git to fetch modules. "go mod" in Go versions before 1.14.1 are incompatible with older git versions, including the version of git that ships with CentOS/RHEL 7 (which have git 1.8), see golang/go#38373 This patch switches the scan plugin script to use the default GOPROXY so that git is not required for downloading the modules. Once all our code has upgraded to Go 1.14+, this workaround should be removed. Signed-off-by: Sebastiaan van Stijn <[email protected]>
…HEL 7 Our Dockerfile uses GOPROXY=direct, which makes "go mod" commands use git to fetch modules. "go mod" in Go versions before 1.14.1 are incompatible with older git versions, including the version of git that ships with CentOS/RHEL 7 (which have git 1.8), see golang/go#38373 This patch switches the scan plugin script to use a proxy so that git is not required for downloading the modules Once all our code has upgraded to Go 1.14+, this workaround should be removed. Signed-off-by: Sebastiaan van Stijn <[email protected]>
…HEL 7 Our Dockerfile uses GOPROXY=direct, which makes "go mod" commands use git to fetch modules. "go mod" in Go versions before 1.14.1 are incompatible with older git versions, including the version of git that ships with CentOS/RHEL 7 (which have git 1.8), see golang/go#38373 This patch switches scan install script to set GOPROXY to https://proxy.golang.org so that git is not required for downloading modules. Once all our code has upgraded to Go 1.14+, this workaround should be removed. Signed-off-by: Sebastiaan van Stijn <[email protected]>
… CentOS/RHEL 7 Since rootlesskit removed vendor folder, building it has to rely on go mod. Dockerfile in docker-ce-packaging uses GOPROXY=direct, which makes "go mod" commands use git to fetch modules. "go mod" in Go versions before 1.14.1 are incompatible with older git versions, including the version of git that ships with CentOS/RHEL 7 (which have git 1.8), see golang/go#38373 This patch switches rootlesskit install script to set GOPROXY to https://proxy.golang.org so that git is not required for downloading modules. Once all our code has upgraded to Go 1.14+, this workaround should be removed. Signed-off-by: Tibor Vass <[email protected]>
… CentOS/RHEL 7 Since rootlesskit removed vendor folder, building it has to rely on go mod. Dockerfile in docker-ce-packaging uses GOPROXY=direct, which makes "go mod" commands use git to fetch modules. "go mod" in Go versions before 1.14.1 are incompatible with older git versions, including the version of git that ships with CentOS/RHEL 7 (which have git 1.8), see golang/go#38373 This patch switches rootlesskit install script to set GOPROXY to https://proxy.golang.org so that git is not required for downloading modules. Once all our code has upgraded to Go 1.14+, this workaround should be removed. Signed-off-by: Tibor Vass <[email protected]> (cherry picked from commit cbc6cef) Signed-off-by: Sebastiaan van Stijn <[email protected]>
… CentOS/RHEL 7 Since rootlesskit removed vendor folder, building it has to rely on go mod. Dockerfile in docker-ce-packaging uses GOPROXY=direct, which makes "go mod" commands use git to fetch modules. "go mod" in Go versions before 1.14.1 are incompatible with older git versions, including the version of git that ships with CentOS/RHEL 7 (which have git 1.8), see golang/go#38373 This patch switches rootlesskit install script to set GOPROXY to https://proxy.golang.org so that git is not required for downloading modules. Once all our code has upgraded to Go 1.14+, this workaround should be removed. Signed-off-by: Tibor Vass <[email protected]> Upstream-commit: cbc6cefdcbe8b7ab66571407ee0b3c39f1e7a96b Component: engine
… CentOS/RHEL 7 Since rootlesskit removed vendor folder, building it has to rely on go mod. Dockerfile in docker-ce-packaging uses GOPROXY=direct, which makes "go mod" commands use git to fetch modules. "go mod" in Go versions before 1.14.1 are incompatible with older git versions, including the version of git that ships with CentOS/RHEL 7 (which have git 1.8), see golang/go#38373 This patch switches rootlesskit install script to set GOPROXY to https://proxy.golang.org so that git is not required for downloading modules. Once all our code has upgraded to Go 1.14+, this workaround should be removed. Signed-off-by: Tibor Vass <[email protected]> (cherry picked from commit cbc6cef) Signed-off-by: Sebastiaan van Stijn <[email protected]>
… CentOS/RHEL 7 Since rootlesskit removed vendor folder, building it has to rely on go mod. Dockerfile in docker-ce-packaging uses GOPROXY=direct, which makes "go mod" commands use git to fetch modules. "go mod" in Go versions before 1.14.1 are incompatible with older git versions, including the version of git that ships with CentOS/RHEL 7 (which have git 1.8), see golang/go#38373 This patch switches rootlesskit install script to set GOPROXY to https://proxy.golang.org so that git is not required for downloading modules. Once all our code has upgraded to Go 1.14+, this workaround should be removed. Signed-off-by: Tibor Vass <[email protected]> (cherry picked from commit cbc6cef) Signed-off-by: Sebastiaan van Stijn <[email protected]>
On CentOS 7, the available version of git and/or go is too old and has an issue when running `go get`: git fetch-pack: expected shallow list By setting GOPROXY, git isn't required for `go get` and solves this issue. See golang/go#38373 for more details.
On CentOS 7, the available version of git and/or go is too old and has an issue when running `go get`: git fetch-pack: expected shallow list By setting GOPROXY, git isn't required for `go get` and solves this issue. See golang/go#38373 for more details.
Given that we still don't have a CentOS 7 builder (#29114 has been open without activity since Dec. 2018), I don't have the ability to easily test a fix for this issue. If you'd like to contribute a fix (with a regression test in cmd/go/testdata/script) I'd be happy to review it. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Not sure, but this is the latest supported version for CentOS 7.
What operating system and processor architecture are you using (
go env
)?CentOS 7.
go env
OutputWhat did you do?
Tried to build the latest unreleased version of reposurgeon (problem does not occur with reposurgeon release 4.5).
What did you expect to see?
A successful build.
What did you see instead?
A cryptic error message.
This seems to occur when multiple versions of the same package are required. In this case, the go.mod contains
golang.org/x/arch v0.0.0-20200312215426-ff8b605520f4
andgithub.aaakk.us.kg/go-delve/delve v1.4.0
, but delve v1.4.0 has a dependency on:golang.org/x/[email protected]
. It seems that trying to get the earlier version of arch when the later version has already been retrieved causes this error message.In this case I was able to work around and successfully build by removing the reference to the later version of arch from go.mod.
The text was updated successfully, but these errors were encountered: