Git警告:“在从rosinstall文件构建ROS快照时找不到模板”

huangapple go评论76阅读模式
英文:

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

问题

我正在使用 snapcraft catkin/catkin-tools 插件在 Ubuntu 18.04 上构建一个 ROS 的 Snap 包。该插件有一个选项来定义 rosinstall 文件以获取包的依赖关系。然而,构建过程失败,出现了“Permission denied (publickey)”错误:

正在安装 wstool...
初始化工作区(如果需要)...
合并 /root/parts/workspace/src/snap/local/snap.rosinstall
更新工作区...
主机 'github.com(140.82.118.3)' 的真实性无法确认。
RSA 密钥指纹是 SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx。
您确定要继续连接吗(是/否)?是
更新工作区时出错:正在克隆到 '/root/parts/workspace/src/src/catkin_simple'...
警告:未找到模板 /usr/share/git-core/templates
警告:已将 'github.com,140.82.118.3'(RSA)永久添加到已知主机列表中。
git@github.com: Permission denied (publickey)。
致命:无法从远程存储库读取。
请确保您拥有正确的访问权限
并且存储库存在。
配置错误:处理 'catkin_simple' 时出错:[catkin_simple] 将 git@github.com:catkin/catkin_simple.git 版本 None 检出到 /root/parts/workspace/src/src/catkin_simple 失败。

在我的 snap.rosinstall 文件中,我只有 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]

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

  • 切换到 https 导致错误:警告:未找到模板 /usr/share/git-core/templates 致命:无法找到远程帮助程序以进行 'https'。 我不明白这是为什么,因为这甚至是一个公共仓库。
  • 我使用 sudo 添加了一个 SSH 密钥。ssh -T git@github.comsudo ssh -T git@github.com,以及一般的克隆操作都可以正常工作。
  • 我检查了文件夹 /usr/share/git-core/templates 是否存在,这在一些其他帖子中被标记为解决方案。

我唯一能想象的是这个 VM 中缺少某些东西,snapcraft 在开始时启动。但是,再次强调,使用 snapcraft.yaml 中的 git 作为源(没有 rosinstall)可以正常工作,这是违反直觉的。

希望有人可以在这里提供更多清晰的解释。

英文:

I'm building a ROS snap with the snapcraft catkin/catkin-tools plugin on Ubuntu 18.04. This plugin has the option to define rosinstall files to fetch package dependencies. However, the build process fails with a "Permission denied (publickey)" error:

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.

In my snap.rosinstall file I have only the public catkin_simple plugin:

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

The "parts" part of my snapcraft.yaml looks as follows:

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

I already tried different approaches:

  • Changing to https results in the error: warning: templates not found /usr/share/git-core/templates
    fatal: Unable to find remote helper for 'https'
    . I don't understand this since it is even a public repo.
  • I added a SSH key with sudo. Both ssh -T git@github.com and sudo ssh -T git@github.com, as well as cloning in general work fine.
  • I checked that the folder /usr/share/git-core/templates exists, which was marked as a solution in some other posts.

The only thing I can imagine is that something is missing in this VM, which snapcraft is starting at the beginning. However, again, using git as a source in snapcraft.yaml (without rosinstall) works fine, which is counterintuitive.

Hope that someone can add clarity here.

答案1

得分: 0

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

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

英文:

I will mark the question as solved since it will be fixed in the following pull request:

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

huangapple
  • 本文由 发表于 2020年1月6日 16:56:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/59609149.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定