Go: Go 1.13 Reading From GOPROXY Issue with Uppercases

Created on 4 Sep 2019  ·  3Comments  ·  Source: golang/go

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

$ go version
1.13

Does this issue reproduce with the latest release?

  1. Have any dependency in go.mod that has an uppercase GH organization (i.e github.com/PuerkitoBio/purell)
  2. Have $GOPROXY set (We use Artifactory)
  3. Try running any Go command
  4. Would get github.com/PuerkitoBio/[email protected]: reading https://{GOPROXY}/github.com/%21puerkito%21bio/purell/@v/v1.1.0.mod: 404 Not Found (notice that because of the uppercase P and uppercase B, we see %21 get added in front then the character which I think should just be PuerkitoBio)

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

go env Output

$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN="/Users/kush.patel/Projects/go/bin"
GOCACHE="/Users/kush.patel/Library/Caches/go-build"
GOENV="/Users/kush.patel/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=".hootops.com"
GONOSUMDB="
.hootops.com"
GOOS="darwin"
GOPATH="/Users/kush.patel/Projects/go"
GOPRIVATE="*.hootops.com"
GOPROXY="OURPROXYURL"
GOROOT="/usr/local/Cellar/go/1.13/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.13/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
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 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/5m/7czshm113rv1wzt8r3cjt_hh0000gp/T/go-build810182232=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

  1. Have any dependency in go.mod that has an uppercase GH organization (i.e github.com/PuerkitoBio/purell)
  2. Have $GOPROXY set (We use Artifactory)
  3. Try running any Go command
  4. Would get github.com/PuerkitoBio/[email protected]: reading https://{GOPROXY}/github.com/%21puerkito%21bio/purell/@v/v1.1.0.mod: 404 Not Found (notice that because of the uppercase P and uppercase B, we see %21 get added in front then the character which I think should just be PuerkitoBio)

What did you expect to see?

I expected to see it fetch the package fine and say read from https://{GOPROXY}/github.com/PuerkitoBio/purell/@v/v1.1.0.mod

What did you see instead?

I saw it read from https://{GOPROXY}/github.com/%21puerkito%21bio/purell/@v/v1.1.0.mod

FrozenDueToAge modules

Most helpful comment

This is correct as documented in go help goproxy:

To avoid problems when serving from case-sensitive file systems,
the and elements are case-encoded, replacing every
uppercase letter with an exclamation mark followed by the corresponding
lower-case letter: github.com/Azure encodes as github.com/!azure.

Please file a bug against Artifactory.

All 3 comments

This is correct as documented in go help goproxy:

To avoid problems when serving from case-sensitive file systems,
the and elements are case-encoded, replacing every
uppercase letter with an exclamation mark followed by the corresponding
lower-case letter: github.com/Azure encodes as github.com/!azure.

Please file a bug against Artifactory.

Yeah we're talking with JFrog right now @bakito. We got to them confirming there is a bug on their side and creating that ticket. They have to push it through product though.

Was this page helpful?
0 / 5 - 0 ratings