gpt4 book ai didi

GitCloneTask 不克隆存储库 ("The remote end hung up unexpectedly")

转载 作者:太空狗 更新时间:2023-10-29 14:09:28 26 4
gpt4 key购买 nike

我正在尝试使用 phing 和 GitCloneTask(从 gi​​thub 克隆一个 repo)编写构建文件,但每次运行 phing 时我都会收到此消息:

The remote end hung up unexpectedly

So i checked if i could clone the repo with git-clone => works just fine;

checked my .gitconfig for an error with the Github API Token & Username => no typos or something

checked all repo-urls provided on github (ssh, https, read-only) => none of them changes the message when used in the buildfile

any ideas?

here's the code of the buildfile:

<?xml version="1.0" encoding="UTF-8"?>
<project name="ort" default="init">
<!-- ============================================ -->
<!-- Target: initialize -->
<!-- ============================================ -->
<target name="init">
<input propertyname="local.documentRoot">Where to put the files?:</input>
<mkdir dir="${local.documentRoot}" />
<gitclone
repository="git://github.com/pappelt/oil-resistance-test.git"
targetPath="${local.documentRoot}" />
</target>
</project>

最佳答案

我在 phing 类中进行了一些调试,我认为问题在于您需要在“gitPath”属性中指定 git 二进制文件的路径/名称。

我认为在 Linux 上可能是类似“/usr/lib/git”的东西,我正在运行 Windows 并且只是使用“git”

<target name="gitclone">
<echo msg="Getting latest code from ${git.repo}" />
<gitclone gitPath="git" repository="${git.repo}" targetPath="${build.dir}" />
</target>

之所以有效,是因为我的 git 二进制文件 (C:\Program Files\Git\cmd) 在我的 Windows PATH 中...即我可以打开命令提示符并键入“git”,Windows 就会知道它在哪里。

烦人的是,我正在克隆一个私有(private)仓库,它还需要我输入密码 -_-

关于GitCloneTask 不克隆存储库 ("The remote end hung up unexpectedly"),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5530891/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com