Jenkins running phing exectask. Exectask uses ssh agent forwarding. Permission denied. How to resolve? Jenkins running phing exectask. Exectask uses ssh agent forwarding. Permission denied. How to resolve? jenkins jenkins

Jenkins running phing exectask. Exectask uses ssh agent forwarding. Permission denied. How to resolve?


For one I noticed that your git clone command may be written wrongly.

Check:

    <exec command="ssh -A ${host-used} 'git clone -b ${environment.branch} ${repository-uri} ${environment.sitedir}${build.time}'"

I swapped position of ${environment.branch} and ${repository-uri}.

Reference: git-clone(1) Manual Page


I suggest that you use ant-jsch

I already use ant-jsch under jenkins.

ant-jsch are able to control ssh identify and so on