0

I need to compile vegeta (https://github.com/tsenart/vegeta) in order to verify some assumptions. To do that, I have correctly prepared relevant tools including dep and make, but we cannot access golang.org throughout the nation of China, so each build ends up with similar mistakes as the following:

The following issues were found in Gopkg.toml: ✗ unable to deduce repository and source type for "golang.org/x/net": unable to read metadata: unable to fetch raw metadata: failed HTTP request to URL "http://golang.org/x/net?go-get=1": Get http://golang.org/x/net?go-get=1: dial tcp 216.239.37.1:80: connect: connection timed out

Even though I tried to use a proxy, it seems that dep just cannot use the proxy!

Since I have successfully downloaded golang.org/x/net/http2 to local disk and placed it into proper directory, I wonder whether we can let dep find the http2 locally instead of still contacting http://golang.org/x/net; and if so, how to implement that with dep?

So my question is how to compile vegeta in such a network environment? Thanks a lot in advance.

fengnix
  • 85
  • 6

1 Answers1

0

Where does it talk about needing dep for the installation?

It seems like it should be possible to install it using go get -u github.com/tsenart/vegeta, since the package now uses modules. In case the official go module proxy is blocked, there are other proxies that also work in China.

xarantolus
  • 1,961
  • 1
  • 11
  • 19
  • Since I have downloaded the required http2 module and put it into proper directory, whether we can let dep find the module locally rather still downloading it from remote website that has been blocked? – fengnix Jan 06 '20 at 03:31