Following this answer, I'm trying to clone a repository inside the a post-process function in my Yocto process:
my_postprocess_function() {
ssh-agent bash -c 'ssh-add /home/mark/.ssh/key; git clone git@gitlab.com:<myrepo> ${IMAGE_ROOTFS}/opt/;'
}
ROOTFS_POSTPROCESS_COMMAND += "my_postprocess_function; "
It says:
ssh-agent: not found
Of course ssh-agent
is installed in my machine, but it's not found when the function is executed.
Why?