【问题标题】:git clone not working with git:// in virtualboxgit clone 不能在 virtualbox 中使用 git://
【发布时间】:2016-11-17 21:01:09
【问题描述】:

我有 Windows 7 作为主机系统,并通过虚拟机安装了 ubuntu 16.04。在虚拟框中,如果我想克隆任何 git 存储库,它不适用于 git://。为了完成这项工作,我使用了 git config 选项,

git config --global url."https://".insteadOf git://

并开始通过 https:// 访问存储库。

evk1206@evk1206-VirtualBox:~/Vinoth$ git clone git://git.yoctoproject.org/poky
Cloning into 'poky'...
fatal: repository 'https://git.yoctoproject.org/poky/' not found


evk1206@evk1206-VirtualBox:~/Vinoth$ git clone https://git.yoctoproject.org/git/poky
Cloning into 'poky'...
remote: Counting objects: 342925, done.
remote: Compressing objects: 100% (82825/82825), done.

现在我正在使用 yocto 项目并尝试创建一个 bsp 层。当我尝试创建 bsp 层时,我看到了与 git 存储库连接有关的问题。

evk1206@evk1206-VirtualBox:~/Yocto/poky/build$ yocto-bsp create mib arm
Checking basic git connectivity...
Couldn't verify git connectivity, exiting

Details: couldn't access git://git.yoctoproject.org/linux-yocto-dev.git
         (this most likely indicates a network connectivity problem or
         a misconfigured git intallation)
evk1206@evk1206-VirtualBox:~/Yocto/poky/build$

现在我不知道如何解决这个问题。有关此主题的任何信息都会有所帮助

【问题讨论】:

    标签: git github virtualbox yocto


    【解决方案1】:

    我可以在非虚拟 Ubuntu 上重现它。您可以通过以下方式访问第一个存储库:
    git://git.yoctoproject.org/poky

    https://git.yoctoproject.org/git/poky
    (不同的路径)

    使用您的配置,“git://”被“https://”替换,并且您正在尝试连接到不存在的“https://git.yoctoproject.org/poky”(由于 URL 中缺少“/git”路径)。

    第二个存储库也是如此:
    git://git.yoctoproject.org/linux-yocto-dev.git(工作)
    https://git.yoctoproject.org/linux-yocto-dev.git(不工作,但由于配置而使用)
    https://git.yoctoproject.org/git/linux-yocto-dev.git(工作)

    不知道,为什么“git://”在你的虚拟机上不起作用,可能是代理问题?

    【讨论】:

      【解决方案2】:

      对于 Yocto 项目,要使用代理,请按照以下链接中提供的说明进行操作:

      https://wiki.yoctoproject.org/wiki/Working_Behind_a_Network_Proxy

      按照说明操作后,我的问题就解决了。

      【讨论】:

        猜你喜欢
        • 2020-11-28
        • 1970-01-01
        • 1970-01-01
        • 2010-11-17
        • 1970-01-01
        • 2016-09-29
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多