go: cmd/go: git remote did not send all necessary objects
What version of Go are you using (go version
)?
$ go version go version go1.20.2 darwin/arm64
Does this issue reproduce with the latest release?
Yes - inconsistently
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GO111MODULE="" GOARCH="arm64" GOBIN="" GOCACHE="/Users/x/Library/Caches/go-build" GOENV="/Users/x/Library/Application Support/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="darwin" GOINSECURE="" GOMODCACHE="/Users/x/dev/go/pkg/mod" GONOPROXY="git-codecommit.ap-southeast-2.amazonaws.com,x" GONOSUMDB="git-codecommit.ap-southeast-2.amazonaws.com,x" GOOS="darwin" GOPATH="/Users/x/dev/go" GOPRIVATE="git-codecommit.ap-southeast-2.amazonaws.com,x" GOPROXY="https://proxy.golang.org/,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64" GOVCS="" GOVERSION="go1.20.2" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/x/dev/x/go.mod" GOWORK="" CGO_CFLAGS="-O2 -g" CGO_CPPFLAGS="" CGO_CXXFLAGS="-O2 -g" CGO_FFLAGS="-O2 -g" CGO_LDFLAGS="-O2 -g" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/fx/gdzg_qkn6y79r0cjz5d87j140000gn/T/go-build35198489=/tmp/go-build -gno-record-gcc-switches -fno-common"
What did you do?
Seems very similar to old issue #31399
Getting inconsistent results when running go get command on a CodeCommit git repo. In the form of:
go get -x git-codecommit.ap-southeast-2.amazonaws.com/v1/repos/x.git@<branch>
The command fails inconsistently with
fatal: bad object <some commit>
error: https://git-codecommit.ap-southeast-2.amazonaws.com/v1/repos/x did not send all necessary objects
Using the local machine, switching the branch name sometimes got it to work. However, using our CICD pipeline the command seems to always fail no matter the branch.
It doesn’t fail ever with go version 1.19 - so there doesn’t appear to be a problem with the repository.
EDIT: also noting that the commit hash that it complains about is different on different branches that we try it on
What did you expect to see?
The command successfully completes which is the case when switching back to v1.19
What did you see instead?
did not send all necessary objects
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 24 (6 by maintainers)
@jpduckwo Yes, I tried
go get -x
with 1.19 and 1.20, and I saw the same logs with your’s. In addition, I foundgo get xxx@tag
work fine, butgo get xxx@commitId
not.Hello! I had a similar issue with git a few weeks ago and found this blog post, hope it helps! I’ve ran into this error a few times now in unrelated projects.