Git 警告 "templates not found" 从 rosinstall 文件构建 ROS 快照时

Git warning "templates not found" while building ROS snap from rosinstall file

我正在 Ubuntu 18.04 上使用 snapcraft catkin/catkin-tools 插件构建 ROS snap。该插件可以选择定义 rosinstall 文件以获取包依赖项。但是,构建过程失败并出现 "Permission denied (publickey)" 错误:

Installing wstool...
Initializing workspace (if necessary)...
Merging /root/parts/workspace/src/snap/local/snap.rosinstall
Updating workspace...
The authenticity of host 'github.com (140.82.118.3)' can't be established.
RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no)? yes
Error updating workspace: Cloning into '/root/parts/workspace/src/src/catkin_simple'...
warning: templates not found /usr/share/git-core/templates
Warning: Permanently added 'github.com,140.82.118.3' (RSA) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
ERROR in config: Error processing 'catkin_simple' : [catkin_simple] Checkout of git@github.com:catkin/catkin_simple.git version None into /root/parts/workspace/src/src/catkin_simple failed.

在我的 snap.rosinstall 文件中,我只有 public catkin_simple 插件:

- git:
    local-name: catkin_simple
    uri: git@github.com:catkin/catkin_simple.git

我的 snapcraft.yaml 的 "parts" 部分如下所示:

parts: 
  workspace:
    plugin: catkin-tools
    source: .
    rosinstall-files: [snap/local/snap.rosinstall]
    catkin-packages: [catkin_simple]

我已经尝试过不同的方法:

我唯一能想到的是这个 VM 中缺少某些东西,snapcraft 从一开始就启动了。然而,再次使用 git 作为 snapcraft.yaml 中的来源(没有 rosinstall)工作正常,这是违反直觉的。

希望有人能在这里补充清楚。

我会将问题标记为已解决,因为它将在以下拉取请求中修复:

https://github.com/snapcore/snapcraft/pull/2852