Error /bin/sh:1: scp not found

WARNING: modbus-sdk-1.0+git${SRCPV}-r0 do_fetch: Failed to fetch URL ssh://git@github.com/.../MISC-Modbus-SDK-Cpp-Library.git;branch=master, attempting MIRRORS if available
ERROR: modbus-sdk-1.0+git${SRCPV}-r0 do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export PATH="/home/build/shared/oe-core/layers/openembedded-core/scripts:/home/build/shared/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/modbus-sdk/1.0+git${SRCPV}-r0/recipe-sysroot-native/usr/bin/arm-angstrom-linux-gnueabi:/home/build/shared/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/modbus-sdk/1.0+git${SRCPV}-r0/recipe-sysroot/usr/bin/crossscripts:/home/build/shared/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/modbus-sdk/1.0+git${SRCPV}-r0/recipe-sysroot-native/usr/sbin:/home/build/shared/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/modbus-sdk/1.0+git${SRCPV}-r0/recipe-sysroot-native/usr/bin:/home/build/shared/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/modbus-sdk/1.0+git${SRCPV}-r0/recipe-sysroot-native/sbin:/home/build/shared/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/modbus-sdk/1.0+git${SRCPV}-r0/recipe-sysroot-native/bin:/home/build/shared/oe-core/layers/openembedded-core/bitbake/bin:/home/build/shared/oe-core/build/tmp-glibc/hosttools"; export HOME="/home/build"; scp -B -r  git@github.com:.../MISC-Modbus-SDK-Cpp-Library.git /home/build/shared/oe-core/build/downloads/ failed with exit code 127, output:
/bin/sh: 1: scp: not found

ERROR: modbus-sdk-1.0+git${SRCPV}-r0 do_fetch: Fetcher failure for URL: 'ssh://git@github.com/.../MISC-Modbus-SDK-Cpp-Library.git;branch=master'. Unable to fetch URL from any source.
ERROR: modbus-sdk-1.0+git${SRCPV}-r0 do_fetch: Function failed: base_do_fetch
ERROR: Logfile of failure stored in: /home/build/shared/oe-core/build/tmp-glibc/work/armv7at2hf-neon-angstrom-linux-gnueabi/modbus-sdk/1.0+git${SRCPV}-r0/temp/log.do_fetch.170
ERROR: Task (/home/build/shared/oe-core/build/../layers/meta-semisens/recipes-support/modbus-sdk/modbus-sdk_git.bb:do_fetch) failed with exit code '1'

I don’t know why scp can not be found. The scp package should be installed.
I don’t know if i made something wrong with the scp intallation.
It would be great if somebody could help me with this issue.

Hi @ortnerFuE and welcome to our community,
taking a couple of steps back:

  • Do you have an ssh key connected to a GitHub account? Bitbake will use those to fetch over ssh.
  • We have to tell Bitbake to use the host scp executable by appending its name to the HOST_TOOLS variable. You can do that in your local.conf.
  • Do you really want to use ssh to clone this repo? It’s generally good practice to use https on public repos, such as this one. So it might be easier to just change the SRC_URI to point to https://github.com/fz-lyu/modbuspp.git;branch=master.

Regards,

Hello @ortnerFuE,
Hope you are doing well. Were you able to make some progress on this topic? Did the suggestions from @leon.tx help?