Description
Apache maintains read-only Git mirrors at http://git.apache.org/ (See http://www.apache.org/dev/git.html for more details). Only HTTP and Git protocols are supported (i.e. no HTTPS at the moment)
go get fails to clone such repositories. E.g.:
> go get git.apache.org/thrift.git/lib/go/thrift
fatal: repository 'http://git.apache.org/thrift/' not found
This happens because go get extracts incorrect remote repository URL from import path.
E.g. for git.apache.org/thrift.git/lib/go/thrift
import path the remote URL used by go is http://git.apache.org/thrift/
while the correct remote URL should be http://git.apache.org/thrift.git
(compare git ls-remote http://git.apache.org/thrift.git vs git ls-remote http://git.apache.org/thrift/)
To fix this a special case needs to be added for git.apache.org in cmd/go/vcs.go similar to (github, launchpad, etc).
I am happy to contribute and test a patch if adding support for another special Git repo to go get seems to be reasonable to Go Team.