Description
Go version
go version go1.21.4 linux/arm64
Reproducibility
- Does this issue reproduce with the latest release?
What operating system and processor architecture are you using (go env
)?
GO111MODULE=''
GOARCH='arm'
GOBIN=''
GOCACHE='/home/shane/.cache/go-build'
GOENV='/home/shane/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='arm64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/shane/go/pkg/mod'
GONOPROXY='shanehowearth.com'
GONOSUMDB='shanehowearth.com'
GOOS='linux'
GOPATH='/home/shane/go'
GOPRIVATE='shanehowearth.com'
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/local/go/pkg/tool/linux_arm64'
GOVCS=''
GOVERSION='go1.21.4'
GCCGO='gccgo'
GOARM='7'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='0'
GOMOD='/home/shane/go/src/shanehowearth.com/onepage/api/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 -marm -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build4248562263=/tmp/go-build -gno-record-gcc-switches'
What did you do?
I have created a private git repository on my VPC - and it is available via SSH
I can git clone
the repository just fine, but I cannot go get shanehowearth.com/project/repo.git
and as soon as I try to import a package from within the repo (eg project/repo.git/package/) I get errors
What did you expect to see?
I expect to be able to use the module hosted on my VPS just like any other go module.
What did you see instead?
0.826 repo.go:8:2: no required module provides package shanehowearth.com/project/repo.git/grpc/client/v1; to add it:
0.826 go get shanehowearth.com/project/repo.git/grpc/client/v1
0.826 repo.go:9:2: no required module provides package shanehowearth.com/project/repo.git/grpc/proto/v1; to add it:
0.826 go get shanehowearth.com/project/repo.git/grpc/proto/v1
Dockerfile:15
13 |
14 | # build time
15 | >>> RUN GOPRIVATE=shanehowearth.com CGO_ENABLED=0 GOOS=linux go build -v -o /go/bin/api cmd/*.go
16 |
17 | FROM scratch
ERROR: failed to solve: process "/bin/sh -c GOPRIVATE=shanehowearth.com CGO_ENABLED=0 GOOS=linux go build -v -o /go/bin/api cmd/*.go" did not complete successfully: exit code: 1
make: *** [Makefile:2: docker] Error 1
shane@raspberrypi ~/go/src/shanehowearth.com/project/api main ! GOPRIVATE=shanehowearth.com go get shanehowearth.com/project/repo.git/grpc/client/v1
go: shanehowearth.com/project/repo.git/grpc/client/v1: module shanehowearth.com/project/repo.git/grpc/client: git ls-remote -q origin in /home/shane/go/pkg/mod/cache/vcs/8e94b8a1ff4a9110d6f80a0b032164dc170cd0de07cc65b1945b9dd0a98feab6: exit status 128:
fatal: unable to connect to shanehowearth.com:
shanehowearth.com[0: 81.4.127.22]: errno=Connection refused
shane@raspberrypi ~/go/src/shanehowearth.com/project/api main ! GOPRIVATE=shanehowearth.com go get shanehowearth.com/project/repo/grpc/client/v1
go: shanehowearth.com/project/repo/grpc/client/v1: unrecognized import path "shanehowearth.com/project/repo/grpc/client": reading https://shanehowearth.com/project/repo/grpc/client?go-get=1: 404 Not Found
server response: 404 page not found
shane@raspberrypi ~/go/src/shanehowearth.com/project/api main ! GOPRIVATE=shanehowearth.com go get shanehowearth.com/project/repo/grpc/client/v1.git
go: module shanehowearth.com/project/repo/grpc/client/v1.git: git ls-remote -q origin in /home/shane/go/pkg/mod/cache/vcs/403cc645b5880635cb36ea2d7c06d2b413e94c687e6e883dc603f902890bba00: exit status 128:
fatal: unable to connect to shanehowearth.com:
shanehowearth.com[0: 81.4.127.22]: errno=Connection refused