ROS2 colcon build of lss_ros2_control fails due to git clone permission denied

I am trying to install the LSS-ROS2-Arms package.
I am following the instructions on GitHub - Lynxmotion/LSS-ROS2-Arms
I am running Ubuntu 20.04.6 and ROS2 Galactic.

My problem is with this build command: colcon build --symlink-install

Specifically it is failing when trying to git clone:
I’m not knowledgeable about using public keys with github.
Can someone provided instructions to make a public key to work.
OR provide instructions on how to use https method of git clone with the colcon build.

cnl@cnl-Latitude-E7470:~/Projects/SEED-HRI/Apps/LSS-ROS2/LSS-ROS2-Arms$ colcon build --symlink-install --packages-select lss_ros2_control
Starting >>> lss_ros2_control
The authenticity of host ‘github.com (140.82.112.4)’ can’t be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
*[2.9s] [0/1 complete] [lss_ros2_control:build 10% - 2.5s] erprint])? *
*— stderr: lss_ros2_control *
Cloning into ‘lynxmotion-lss’…
Warning: Permanently added ‘github.com,140.82.112.4’ (ECDSA) to the list of known hosts.

[email protected]: Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Cloning into ‘lynxmotion-lss’…
[email protected]: Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
Cloning into ‘lynxmotion-lss’…
[email protected]: Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
CMake Error at /home/cnl/Projects/SEED-HRI/Apps/LSS-ROS2/LSS-ROS2-Arms/build/lss_ros2_control/lynxmotion-lss/tmp/lynxmotion-lss-gitclone.cmake:31 (message):

  • Failed to clone repository:*
  • [email protected]:lynxmotionbeta/AlternativeLSS.git’*

make[2]: *** [CMakeFiles/lynxmotion-lss.dir/build.make:91: lynxmotion-lss/src/lynxmotion-lss-stamp/lynxmotion-lss-download] Error 1
make[1]: *** [CMakeFiles/Makefile2:134: CMakeFiles/lynxmotion-lss.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Failed <<< lss_ros2_control [3.56s, exited with code 2]

Summary: 0 packages finished [3.93s]

  • 1 package failed: lss_ros2_control*
  • 1 package had stderr output: lss_ros2_control*
    cnl@cnl-Latitude-E7470:~/Projects/SEED-HRI/Apps/LSS-ROS2/LSS-ROS2-Arms$

Hello @guyleblond ,

You must provide your public key to GitHub to establish a secure connection. Please follow this to generate it:

2 Likes

I resolved git clone issue.
Now I have a problem building lss_ros2_control using:
colcon build --symlink-install --packages-select lss_ros2_control
I noticed this fault is similar to this post which has no resolution:

I followed these steps but it made no difference:
sudo apt update
sudo apt install gcc-10
sudo apt install g+±10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10 --slave /usr/bin/g++ g++ /usr/bin/g+±10
sudo update-alternatives --auto gcc
gcc --version
returns:
gcc (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

sudo apt install ros-galactic-ament-cmake-catch2

I attached the output.
ros2 build error.txt (10.7 KB)

This is not a common issue, so we’re asking around. Keep trying in the meantime.

1 Like

I think you’ve installed the ROS2 dependancies but have you brought in the ros2 build platform using something like:
source /opt/ros/ros2-galactic/setup.bash

Since the errors are not finding the rclcpp namespace, it indicates that the includes/libs/etc for ros2 itself has not been setup. Typically people would add the source command to their .bash_profile or something so it’s done automatically.

Ros2 environments work by “sourcing overlays”. You source the main ros2 (i.e. galactic), then you can build Ros projects, then you have to source those too so ros2 can find and run the project you just compiled. If you use gazebo, you have to source that too…so for me, when setting up my build environment I would do something like:
source /opt/ros/galactic/setup.bash
source /usr/local/share/gazebo/setup.sh
source ~/src/ros/lss/install/setup.bash <== where I put my lss-ros2 projects I previously built

If I haven’t built the lss-ros2 stuff yet then I wouldn’t source it yet either. I’d source the first two, then cd into ~/src/ros/lss and do the colcon build, then source after that. I would have git cloned all the lss-ros2 projects into ~/src/ros/lss but this dir is arbitrary - could be anywhere you want.

I would see this ros docs page and start at the Tasks section:
https://docs.ros.org/en/foxy/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html#source-the-setup-files

Hope this helps!

1 Like