【问题标题】:Git warning "templates not found" while building ROS snap from rosinstall file从 rosinstall 文件构建 ROS snap 时 Git 警告“找不到模板”
【发布时间】:2020-04-23 19:44:28
【问题描述】:

我正在 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 文件中,我只有公共 catkin_simple 插件:

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

我的 snapcraft.yaml 的“部分”部分如下所示:

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

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

  • 更改为 https 会导致错误:warning: templates not found /usr/share/git-core/templates fatal: Unable to find remote helper for 'https'。我不明白这一点,因为它甚至是一个公共回购。
  • 我用 sudo 添加了一个 SSH 密钥。 ssh -T git@github.comsudo ssh -T git@github.com 以及一般克隆都可以正常工作。
  • 我检查了文件夹/usr/share/git-core/templates 存在,在其他一些帖子中将其标记为解决方案。

我唯一能想到的是这个虚拟机中缺少一些东西,而 snapcraft 是从一开始就开始的。但是,再次使用 git 作为 snapcraft.yaml 中的源(没有 rosinstall)可以正常工作,这是违反直觉的。

希望有人可以在这里添加清晰度。

【问题讨论】:

  • 警告(未找到模板)是无害的,但表明系统 Git 安装中有些“不正常”(通常在模板目录中有示例挂钩)。 “无法找到 https 的远程帮助程序”表示安装也有其他问题。拒绝 ssh 密钥表示 ssh 密钥错误/错误,这也与手动测试不相符。我根本不清楚这里出了什么问题。

标签: git ubuntu-18.04 ros catkin snapcraft


【解决方案1】:

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

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-03-17
    • 2015-07-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多