I am trying to use Phing to call git and pull a remote private repository, but it's not working.
Here is my code for Phing:
<project name="test" default="main">
<!-- Get User Variables -->
<property file="build.properties" />
<!-- Declare Variables -->
<property name="base.dir" value="../" />
<property name="git.repository" value="git@github.com:test/test.git" />
<!-- Pull Git Release -->
<target name="git.pull">
<gitpull
repository="${git.repository}"
source="origin"
refspec="${git.release}"
/>
</target>
<target name="main" depends="git.pull">
</target>
</project>
But when I run I get this error:
You must specify readable directory as repository.
Does anyone know how to do this? Or have a working example?
For pull
you must give a local repository. The remote repository (the one, where to pull from) is the one you give with source
You can find examples in the test https://github.com/phingofficial/phing/blob/master/test/etc/tasks/ext/git/GitPullTaskTest.xml