Skip to content

cmd/go: work around insecure redirects for domains hosted on GitHub Pages #32071

@rogpeppe

Description

@rogpeppe

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

$ go version
go version devel +2e4edf4697 Sun May 12 07:14:09 2019 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes

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

go env Output
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/rog/.cache/go-build"
GOENV="/home/rog/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/rog/src/go"
GOPROXY="direct"
GOROOT="/home/rog/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/home/rog/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/rog/src/work/quicktest/go.mod"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build245885201=/tmp/go-build -gno-record-gcc-switches"

What did you do?

 cd $(mktemp -d)
 go mod init m
 go get googlemaps.github.io/maps

What did you expect to see?

I'd expect the command to succeed. It works on Go 1.12.

What did you see instead?

$ go get googlemaps.github.io/maps
go get googlemaps.github.io/maps: unrecognized import path "googlemaps.github.io/maps" (https fetch: Get http://googlemaps.github.io/maps/?go-get=1: redirected from secure URL https://googlemaps.github.io/maps?go-get=1 to insecure URL http://googlemaps.github.io/maps/?go-get=1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions