使用github构建geonode客户端时出错?

时间:2011-03-15 08:14:42

标签: git

$ git clone git://github.com/GeoNode/geonode-client.git geonode-client
$ cd geonode-client
$ ant init debug

我得到的错误就是这个

Buildfile: build.xml

init:
     [echo] pulling in ringo (ignore fatal warning)
     [exec] fatal: destination directory '.' already exists.
     [exec] Result: 128
     [exec] From git://github.com/GeoNode/geonode-client
     [exec]  * branch            master     -> FETCH_HEAD
     [exec] Already up-to-date.
     [exec] error: pathspec 'build/ringo/e0dce2be640fc6fb43a1239d252948d10687ba9c' did not match any file(s) known to git.

BUILD FAILED
/home/palantir/geonode1/src/geonode-client/build.xml:22: exec returned: 1

如何调试此错误?

1 个答案:

答案 0 :(得分:0)

build.xml的相关行是:

   <mkdir dir="${build}"/>
   <echo message="pulling in ringo (ignore fatal warning)"/>
    <mkdir dir="${build}/ringo"/>
    <exec executable="git" dir="${build}/ringo" failonerror="false">
        <arg line="clone -nq git://github.com/ringo/ringojs.git ."/>
    </exec>
    <exec executable="git" dir="${build}/ringo" failonerror="true">
        <arg line="pull origin master"/>
    </exec>
    <exec executable="git" dir="${build}/ringo" failonerror="true">
        <arg line="checkout e0dce2be640fc6fb43a1239d252948d10687ba9c"/>
    </exec>

问题来自于未能在当前${build}/ringo中克隆ringo repo。

可能是这样的情况:

  • git之前的1.6,它没有很好地处理'。'当前目录git clone
    (那么你使用的是什么版本的Git?)
  • 非空目录(“仅当目录为空时才允许克隆到现有目录中”),这不应该是这种情况,因为上面刚刚创建了${build}
    仍然仔细检查${build}的值并确保它实际上是空的。