相关疑难解决方法(0)

如何将`git:`urls转换为`http:`urls

我在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)

所以这个答案并没有真正帮助我.

git proxy

132
推荐指数
3
解决办法
9万
查看次数

什么是"获得"私人存储库的正确方法?

$ 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都不是那么好,是否还有其他的?

git go

107
推荐指数
11
解决办法
7万
查看次数

标签 统计

git ×2

go ×1

proxy ×1