我正在使用ANT帮助进行GIT克隆。以下是我使用的代码:
<target name ="deploy">
<sshexec host="ssh://user@rep_location/project_name.git"
username="username"
password=""
passphrase="passphrase"
trust="true"
command="git clone ssh://user@rep_location/project_name.git D:/dest"/
/>
</target>
我需要将代码库克隆到所需的文件夹 "D:/dest
",但是遇到了未知主机异常
错误。
我已经尝试了一些关于主机的组合,例如ssh://user@rep_location
,但是它返回服务器连接超时。
我们需要在检出时提供密码。
这个命令在GIT BASH
中可以正常工作。