如何在MS Windows操作系统上使用Google的回购工具? [英] How to use Google's repo tool on MS Windows OS?

查看:171
本文介绍了如何在MS Windows操作系统上使用Google的回购工具?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为Windows安装了git,并且工作正常(例如,使用以下解决方案之一想要下载一个Git仓库,我需要什么(Windows机器)?)。



我试图使用 repo of google ,但它需要 gpg 和python 2.7。我安装了它们,它工作正常,唯一的问题是 repo 脚本使用了一些面向unix的功能,如符号链接和 fcntl 。是否有任何代替Windows的 repo

我无法通过google找到一些本机解决方案。如果有的话,我会尝试将其推入Google回购git存储库或尝试按原样使用它。

解决方案

是的,Google repo 视窗。请按照以下步骤操作。



但之前,由于 Borealid 表示 repo 未在Windows上移植。 repo forall.py )使用 fcntl 。 p>

然而,有 Cygwin 和它自己的 python git 工具。

如果您的MSysGit项目的 git 版本或者您喜欢 git code>仅基于MSysGit的GUI,然后按照以下步骤操作。这些步骤确保 Cygwin可以创建本机NTFS符号链接。否则,如果Cygwin的 git 就足够了,则不必这样做。但是,设置 CYGWIN = winsymlinks:native 会使Cygwin使用本机NTFS符号链接而不是旧Cygwin解决方法。


  1. 使用Windows Vista或更高版本(或切换到Linux)
  2. 拥有管理权限

  3. 下载并安装Cygwin 32位或64位)

  4. 选择并安装 python git (和 gpg 如果您想要的话)从Cygwin安装程序

  5. 设置 CYGWIN = winsymlinks:native 在你的Cygwin shell中:

      export CYGWIN = winsymlinks:native 
    mkdir NEW_DIR
    cd NEW_DIR
    repo init -u YOUR_URL
    repo sync -j 7


(另请参阅我的其他帖子


I installed git for windows and it works fine(e.g. use one of the following solutions Want to download a Git repository, what do I need (windows machine)?).

I tried to use repo of google but it needs gpg and python 2.7. I installed both and it works fine the only problem is that repo script use some unix oriented features such as symbolic links and fcntl. Is there any alternative code of repo for windows?

I couldn't found some native solution by google. if there is one I'll try to push it into google repo git repository or try to use it as is.

解决方案

Yes, Google repo script can be compliant with Windows. Follow the steps below.

But before, as Borealid said repo as not been ported on Windows. repo (forall.py) uses fcntl that is not available on Windows (Unix only).

However there is Cygwin and its own python and git tools.

If git version from MSysGit project for you or if you love your git GUI that is based on MSysGit only, then follow the following steps. These steps ensure that Cygwin can create native NTFS symlinks. Else if the git from Cygwin is sufficient, you do not have to do it. But it is better as setting CYGWIN=winsymlinks:native tells Cygwin to use native NTFS symlinks instead of old Cygwin workaround.

  1. Use Windows Vista or later (or switch to Linux)
  2. Have Admin privileges
  3. Dowload and install Cygwin (32 or 64 bits)
  4. Select and install python and git (and gpg if you want) from Cygwin installer
  5. Set CYGWIN=winsymlinks:native in your Cygwin shell:

    export CYGWIN=winsymlinks:native
    mkdir NEW_DIR
    cd    NEW_DIR
    repo init -u YOUR_URL
    repo sync -j 7
    

(see also my other post)

这篇关于如何在MS Windows操作系统上使用Google的回购工具?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆