我在http代理后面工作.我正在尝试使用他们的"repo"工具克隆Android的源代码树.
此工具坚持使用git://URL,即使http://URL也有效.结果,我无法下载源代码.
有可能强制git总是使用http吗?
编辑:我的http_proxy配置正确.例如,这有效:
git clone http://android.git.kernel.org/platform/manifest.git
Run Code Online (Sandbox Code Playgroud)
但这不会(错误=连接超时):
git clone git://android.git.kernel.org/platform/manifest.git
Run Code Online (Sandbox Code Playgroud)
所以这个答案并没有真正帮助我.
$ go get在谷歌尝试之后,我正在寻找使用私有存储库的方法.
第一次尝试:
$ go get -v gitlab.com/secmask/awserver-go
Fetching https://gitlab.com/secmask/awserver-go?go-get=1
https fetch failed.
Fetching http://gitlab.com/secmask/awserver-go?go-get=1
Parsing meta tags from http://gitlab.com/secmask/awserver-go?go-get=1 (status code 200)
import "gitlab.com/secmask/awserver-go": parse http://gitlab.com/secmask/awserver-go?go-get=1: no go-import meta tags
package gitlab.com/secmask/awserver-go: unrecognized import path "gitlab.com/secmask/awserver-go
Run Code Online (Sandbox Code Playgroud)
是的,它没有看到meta标签,因为我不知道如何提供登录信息.
第二次尝试:
关注https://gist.github.com/shurcooL/6927554.将配置添加到.gitconfig.
[url "ssh://git@gitlab.com/"]
insteadOf = https://gitlab.com/
$ go get -v gitlab.com/secmask/awserver-go --> not work
$ go get -v gitlab.com/secmask/awserver-go.git --> work but I got src/gitlab.com/secmask/awserer-go.git
Run Code Online (Sandbox Code Playgroud)
是的它可以工作,但.git扩展了我的项目名称,我可以将它重命名为原始,但每次$ go get都不是那么好,是否还有其他的?