我正在尝试在公司代理后面的RHEL6服务器上克隆go package(golang.org/x/text/language,存储在go.googlesource.com上),但go get命令失败:
> go get -v golang.org/x/text/language
Fetching https://golang.org/x/text/language?go-get=1
Parsing meta tags from https://golang.org/x/text/language?go-get=1 (status code 200)
get "golang.org/x/text/language": found meta tag main.metaImport{Prefix:"golang.org/x/text", VCS:"git", RepoRoot:"https://go.googlesource.com/text"} at https://golang.org/x/text/language?go-get=1
get "golang.org/x/text/language": verifying non-authoritative meta tag
Fetching https://golang.org/x/text?go-get=1
Parsing meta tags from https://golang.org/x/text?go-get=1 (status code 200)
golang.org/x/text (download)
# cd .; git clone https://go.googlesource.com/text /local/home/me/dev/src/golang.org/x/text
Cloning into '/local/home/me/dev/src/golang.org/x/text'...
error: HTTP response code said error while accessing https://go.googlesource.com/text/info/refs
fatal: HTTP request failed
package golang.org/x/text/language: exit status 128
我很确定这与git无法克隆有关,因为以下命令也会失败:
git clone --verbose https://go.googlesource.com/text
Cloning into 'text'...
error: HTTP response code said error while accessing https://go.googlesource.com/text/info/refs
fatal: HTTP request failed
我已经在我的shell环境和git(http和https)中设置了代理,它们正在运行,如您所见:
wget https://go.googlesource.com/text
--2017-07-04 11:17:15-- https://go.googlesource.com/text
Resolving our.proxy.host ... 10.4.xxx.xxx
Connecting to our.proxy.host|10.4.xxx.xxx|:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: “text”
[ <=> ] 11,014 --.-K/s in 0.02s
2017-07-04 11:17:15 (622 KB/s) - “text” saved [11014]
go get似乎工作正常,因为我没有遇到任何执行问题
go get github.com/stretch/testify
非常感谢任何关于可能出现问题的线索。
提前致谢, 乔治