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相对应,实现正常访问。


  • 相关阅读:
    基本背包问题
    linux 共享内存实现
    Linux内存管理原理
    从inet_pton()看大小端字节序
    linux线程的实现
    简述memcached中的一致哈希
    c语言实现面向对象OOC
    论记忆力
    关于编程内存泄漏
    一道常考fork题挖掘
  • 原文地址:https://www.cnblogs.com/xiaoerlang/p/4290621.html
Copyright © 2011-2022 走看看