zoukankan      html  css  js  c++  java
  • 【转】jenkins+gitlab配置遇到问题

    搭建jenkins+gitlab拉取代码失败,日志如下:

    ERROR: Error fetching remote repo 'origin'
    hudson.plugins.git.GitException: Failed to fetch from git@gitlab.bbtree.com:magw/crm_api_auto.git
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:862)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1129)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1160)
    at hudson.scm.SCM.checkout(SCM.java:495)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1202)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
    at hudson.model.Run.execute(Run.java:1724)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:97)
    at hudson.model.Executor.run(Executor.java:421)
    Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress git@gitlab.bbtree.com:magw/crm_api_auto.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
    stdout:
    stderr: Host key verification failed.
    fatal: Could not read from remote repository.

    1. 把配置好的公钥、私钥拷贝到jenkins服务器的~/.ssh目录下
    2. 把公钥拷贝到.ssh known_hosts或者authorized_keys(不一定有效,但是解决问题中操作了这一步骤)
    3. 配置jenkins credential,username为jenkins的启动账号,私钥目录选择~/.ssh/id_rsa


    原文:https://blog.csdn.net/qq_30534535/article/details/79307915

  • 相关阅读:
    vue登录注册及token验证
    react实现登录注册
    React Native仿京东客户端实现(首页 分类 发现 购物车 我的)五个Tab导航页面
    进度条效果
    手风琴切换效果
    React实现了一个鼠标移入的菜单栏效果
    react购物车
    react实现tab切换效果
    网络缓存
    java线程面试手写题
  • 原文地址:https://www.cnblogs.com/keepSmile/p/10592338.html
Copyright © 2011-2022 走看看