zoukankan      html  css  js  c++  java
  • ssh 协议执行repo sync 报错:Permission denied (publickey)

    1、ssh key

      已经添加ssh key到gerrit服务器,并且执行ssh协议的git clone可以正常克隆代码到本地,可见不是ssh key的问题。

    2、manifest清单文件配置

      最初在manifest清单文件中配置:

      <remote name="origin" fetch="ssh://git@ip:29418"/>

      或者:

      <remote name="origin" fetch="ssh://ip:29418"/>

    3、出现问题

      在客户端执行repo init -u http://ip/manifest --repo-url http://ip/repo ,运行正常。

      但是执行repo sync后,报错:

      Permission denied (publickey).
      fatal: The remote end hung up unexpectedly


    4、解决方法

      修改manifest文件的fetch元素:


      <remote name="origin" fetch=".."/>

    ".." 意思是fetch的url和repo init时manifest的url对应。


    因为ssh的url需要包含用户名,而客户端用户各不相同,因此这里用".."与manifest相对应,实现正常访问。


  • 相关阅读:
    Visual Studio 常用快捷键 (二)
    Visual Studio 常用快捷键
    页游体验
    JSFL 工具
    GhostCat工具
    如何制作一个塔防游戏
    水墨
    给 想转2dx 却无从下手的aser
    两岸三地在线编程学习网站大全
    as3反射应用及简要代码
  • 原文地址:https://www.cnblogs.com/xiaoerlang/p/4290621.html
Copyright © 2011-2022 走看看