2

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?

Mark
  • 4,338
  • 7
  • 58
  • 120
  • What are you trying to achive because the question seems strange. Maybe I can provide an alternative or solve it then – Florian Berndl Feb 03 '20 at 14:01
  • The goal is to have in the final image a clone of a git repository. In this way I can just login on the target and issue "git pull" to update the files. – Mark Feb 03 '20 at 15:05
  • @FlorianBerndl, any alternative idea? – Mark Feb 08 '20 at 20:05
  • Well, it seems a bit complex for such a simple task. I've ended up mounting the image as devloop and then do whatever I need using a bash script. Anyway, I appreciate a lot your willingness. – Mark Feb 09 '20 at 19:03

0 Answers0