When we run go mod download we get the following error:
Step 20/43 : RUN go mod download
---> Running in 12ad263f79e2
go: cloud.google.com/go/[email protected] requires
rsc.io/[email protected]: unrecognized import path "rsc.io/binaryregexp" (parse https://rsc.io/binaryregexp?go-get=1: no go-import meta tags ())
The command '/bin/sh -c go mod download' returned a non-zero code: 1
We have the following go.mod file:
module github.com/channelmeter/cp-go-api
go 1.13
require (
cloud.google.com/go/bigtable v1.5.0
cloud.google.com/go/storage v1.8.0
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869
github.com/dgrijalva/jwt-go v3.2.1-0.20200107013213-dc14462fd587+incompatible
github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8
github.com/friendsofgo/errors v0.9.2
github.com/fsnotify/fsnotify v1.4.9 // indirect
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab
github.com/go-redis/redis/v7 v7.2.0
github.com/google/cel-go v0.5.0
github.com/google/uuid v1.1.2-0.20190416172445-c2e93f3ae59f
github.com/gorilla/context v1.1.1
github.com/gorilla/mux v1.7.4
github.com/joho/godotenv v1.3.0
github.com/kat-co/vala v0.0.0-20170210184112-42e1d8b61f12
github.com/lib/pq v1.5.2
github.com/mailgun/mailgun-go v2.0.0+incompatible
github.com/mitchellh/mapstructure v1.3.0 // indirect
github.com/op/go-logging v0.0.0-20160315200505-970db520ece7
github.com/pelletier/go-toml v1.8.0 // indirect
github.com/plaid/plaid-go v0.0.0-20200515230911-ec588277465e
github.com/plutov/paypal v2.0.5+incompatible
github.com/shopspring/decimal v1.2.0
github.com/spf13/afero v1.2.2 // indirect
github.com/spf13/cobra v1.0.0 //
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.7.0
github.com/stripe/stripe-go v70.15.0+incompatible
github.com/stripe/stripe-go/v71 v71.11.1
github.com/ulule/limiter/v3 v3.4.2
github.com/volatiletech/null v8.0.1-0.20190125002552-3050386d8cee+incompatible
github.com/volatiletech/null/v8 v8.1.0
github.com/volatiletech/sqlboiler v3.7.1+incompatible
github.com/volatiletech/sqlboiler/v4 v4.2.0
github.com/volatiletech/strmangle v0.0.1
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d
google.golang.org/api v0.29.0
gopkg.in/ini.v1 v1.56.0 // indirect
)
replace labix.org/v2/mgo => /dev/null
replace launchpad.net/gocheck => /dev/null
it appears that rsc.io is having some issues, but need help fixing our jenkins build.
Investigating the issue.
It appears to me that you are using Go modules. Do you have GOPROXY set on your jenkins servers? If so, I think that the code should have been served from there. Example value: GOPROXY="https://proxy.golang.org,direct"
We have this currently:
ENV GOPROXY='direct'
yes we are using go modules and have these set as well:
ENV GO111MODULE='on'
ENV GOSUMDB='off'
everything else is default go 1.13 or 1.14 settings
I would recommend making using of the proxy if your environment allows. It accelerates the module downloads and can protect your builds against cases where hosts are unreliable.
so https://proxy.golang.org is the most recommended proxy?
I would use the default setting which is GOPROXY="https://proxy.golang.org,direct".
More details can be found here: https://golang.org/doc/go1.13#modules
thx the GOPROXY value you mentioned (which is apparently the default as you say) solved the problem for us. appreciate it will close the issue.
To follow up, direct module downloads from rsc.io should be working again.
Most helpful comment
thx the GOPROXY value you mentioned (which is apparently the default as you say) solved the problem for us. appreciate it will close the issue.