windows - Why doesn't "go get gopkg.in/..." work while "go get github.com/..." OK? -
i try use go gopkg.in/fatih/pool.v2
install pool according readme.md
, can't success:
c:\users\xiaona\documents\github> go -v gopkg.in/fatih/pool.v2 fetching https://gopkg.in/fatih/pool.v2?go-get=1 https fetch failed. fetching http://gopkg.in/fatih/pool.v2?go-get=1 import "gopkg.in/fatih/pool.v2": http/https fetch: http://gopkg.in/fatih/poo l.v2?go-get=1: dial tcp 107.178.216.236:80: connectex tcp: connection attempt failed because connected party did not respond after period of ti me, or established connection failed because connected host has failed respon d. package gopkg.in/fatih/pool.v2: unrecognized import path "gopkg.in/fatih/pool.v2 "
while access 107.178.216.236:80
ok in web browser.
i try use go github.com/fatih/pool
, , works ok.
could give clues on issue?
btw: use windows powershell
, git
version 1.9.5
.
the root cause has been found: because computer use web proxy, need set proxy in environment variable:
c:\users\xiaona>set https_proxy=https://web-proxy.corp.hp.com:8080/ c:\users\xiaona>set http_proxy=https://web-proxy.corp.hp.com:8080/ c:\users\xiaona>go -v gopkg.in/fatih/pool.v2 fetching https://gopkg.in/fatih/pool.v2?go-get=1 parsing meta tags https://gopkg.in/fatih/pool.v2?go-get=1 (status code 200) "gopkg.in/fatih/pool.v2": found meta tag main.metaimport{prefix:"gopkg.in/fa tih/pool.v2", vcs:"git", reporoot:"https://gopkg.in/fatih/pool.v2"} @ https://g opkg.in/fatih/pool.v2?go-get=1 gopkg.in/fatih/pool.v2 (download) gopkg.in/fatih/pool.v2
then, ok!
Comments
Post a Comment