We are using dep ensure fo vendoring the dependencies for our project. Now in you system we can't access the external sites and that's the reason we mirrored the repo to our internal sites. The issue I am facing now is, though the Gopkg.tml file I am specifying the mirror repo as a constraint, dep is always going to external site for downloading the dependencies.
e.g. snippet from my Gopkg.tml file :
required = [
"github.com/dimiro1/banner",
"github.com/go-openapi/errors",
"go.uber.org/zap"
]
[[constraint]]
branch = "master"
name = "go.uber.org/zap"
source = "<mirrored location in internal gitlab>"
The error I am hitting while ‘dep ensure’ is :
The following issues were found in Gopkg.toml:
✗ unable to deduce repository and source type for "go.uber.org/zap": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://go.uber.org/zap?go-get=1": Get http://go.uber.org/zap?go-get=1: dial tcp 127.0.0.1:80: connect: connection refused
ProjectRoot name validation failed
Any idea how to solve this issue.
Thanks, Shruti