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

import/path: issue title go get not work normal #69697

Closed
zhhOceanfly opened this issue Sep 28, 2024 · 2 comments
Closed

import/path: issue title go get not work normal #69697

zhhOceanfly opened this issue Sep 28, 2024 · 2 comments

Comments

@zhhOceanfly
Copy link

zhhOceanfly commented Sep 28, 2024

Go version

go version 1.23.1

Output of go env in your module/workspace:

GO111MODULE='on'
GOARCH='amd64'
GOBIN='/Users/oceanfly/.g/goto_1.23.1/bin'
GOCACHE='/Users/oceanfly/Library/Caches/go-build'
GOENV='/Users/oceanfly/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/oceanfly/.g/goto_1.23.1/pkg'
GONOPROXY='git.eframework.cn'
GONOSUMDB='git.eframework.cn'
GOOS='darwin'
GOPATH='/Users/oceanfly/.g/goto_1.23.1'
GOPRIVATE='git.eframework.cn'
GOPROXY='https://goproxy.cn,direct'
GOROOT='/Users/oceanfly/.g/go'
GOSUMDB='off'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/oceanfly/.g/go/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.23.1'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/oceanfly/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/oceanfly/workspace/tmp/hello2/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 x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/sb/dm1_4fws6d59nqm5g3w5s1yr0000gn/T/go-build2975769344=/tmp/go-build -gno-record-gcc-switches -fno-common'
oceanfly:hello2 oceanfly$ go env
GO111MODULE='on'
GOARCH='amd64'
GOBIN='/Users/oceanfly/.g/goto_1.23.1/bin'
GOCACHE='/Users/oceanfly/Library/Caches/go-build'
GOENV='/Users/oceanfly/Library/Application Support/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='darwin'
GOINSECURE=''
GOMODCACHE='/Users/oceanfly/.g/goto_1.23.1/pkg'
GONOPROXY='git.eframework.cn'
GONOSUMDB='git.eframework.cn'
GOOS='darwin'
GOPATH='/Users/oceanfly/.g/goto_1.23.1'
GOPRIVATE='git.eframework.cn'
GOPROXY='https://goproxy.cn,direct'
GOROOT='/Users/oceanfly/.g/go'
GOSUMDB='off'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/Users/oceanfly/.g/go/pkg/tool/darwin_amd64'
GOVCS=''
GOVERSION='go1.23.1'
GODEBUG=''
GOTELEMETRY='local'
GOTELEMETRYDIR='/Users/oceanfly/Library/Application Support/go/telemetry'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='clang'
CXX='clang++'
CGO_ENABLED='1'
GOMOD='/Users/oceanfly/workspace/tmp/hello2/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 x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -ffile-prefix-map=/var/folders/sb/dm1_4fws6d59nqm5g3w5s1yr0000gn/T/go-build3888378042=/tmp/go-build -gno-record-gcc-switches -fno-common'

What did you do?

i want to pull a private repo, i set ~/.gitconfig:
[url "https://private_token@github.com/eframework-cn/"]
insteadOf = https://git.eframework.cn/go/

What did you see happen?

go get -v -x git.eframework.cn/go/EP.GO.UTIL@v1.2.0

get https://git.eframework.cn/go/EP.GO.UTIL?go-get=1

get https://git.eframework.cn/?go-get=1

get https://git.eframework.cn/go?go-get=1

get https://git.eframework.cn/go?go-get=1: Get "https://git.eframework.cn/go?go-get=1": dial tcp: lookup git.eframework.cn: no such host

get https://git.eframework.cn/go/EP.GO.UTIL?go-get=1: Get "https://git.eframework.cn/go/EP.GO.UTIL?go-get=1": dial tcp: lookup git.eframework.cn: no such host

get https://git.eframework.cn/?go-get=1: Get "https://git.eframework.cn/?go-get=1": dial tcp: lookup git.eframework.cn: no such host

get https://git.eframework.cn/?go-get=1

get https://git.eframework.cn/go/EP.GO.UTIL?go-get=1

get https://git.eframework.cn/go?go-get=1

get https://git.eframework.cn/go?go-get=1: Get "https://git.eframework.cn/go?go-get=1": dial tcp: lookup git.eframework.cn: no such host

get https://git.eframework.cn/?go-get=1: Get "https://git.eframework.cn/?go-get=1": dial tcp: lookup git.eframework.cn: no such host

get https://git.eframework.cn/go/EP.GO.UTIL?go-get=1: Get "https://git.eframework.cn/go/EP.GO.UTIL?go-get=1": dial tcp: lookup git.eframework.cn: no such host

go: git.eframework.cn/go/EP.GO.UTIL@v1.2.0: unrecognized import path "git.eframework.cn/go/EP.GO.UTIL": https fetch: Get "https://git.eframework.cn/go/EP.GO.UTIL?go-get=1": dial tcp: lookup git.eframework.cn: no such host

but i can go get from add .git back url, can download but no work, because my package is not with .git
go get -v -x git.eframework.cn/go/EP.GO.UTIL.git@v1.2.0
go get -v -x git.eframework.cn/go/EP.GO.UTIL.git@v1.2.0

get https://git.eframework.cn/?go-get=1

get https://git.eframework.cn/go?go-get=1

get https://git.eframework.cn/go?go-get=1: Get "https://git.eframework.cn/go?go-get=1": dial tcp: lookup git.eframework.cn: no such host

get https://git.eframework.cn/?go-get=1: Get "https://git.eframework.cn/?go-get=1": dial tcp: lookup git.eframework.cn: no such host

go: git.eframework.cn/go/EP.GO.UTIL.git@v1.2.0 found: parsing go.mod:
module declares its path as: git.eframework.cn/go/EP.GO.UTIL
but was required as: git.eframework.cn/go/EP.GO.UTIL.git
go: git.eframework.cn/go/EP.GO.UTIL.git@v1.2.0 requires git.eframework.cn/go/EP.GO.UTIL.git@v1.2.0: parsing go.mod:
module declares its path as: git.eframework.cn/go/EP.GO.UTIL
but was required as: git.eframework.cn/go/EP.GO.UTIL.git

What did you expect to see?

go get github.com/google/uuid@v1.3.1
go: downloading github.com/google/uuid v1.3.1
go: added github.com/google/uuid v1.3.1

@seankhliao
Copy link
Member

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.

For questions please refer to https://github.com/golang/go/wiki/Questions

@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants