jenkins:> git init # timeout=10 ERROR: Error cloning remote repo ‘origin‘

这篇具有很好参考价值的文章主要介绍了jenkins:> git init # timeout=10 ERROR: Error cloning remote repo ‘origin‘。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

这是我在build now时遇到的报错,此时的这个节点是从节点,刚刚搭建完成主从节点去测试能否正常进行build。然后就遇到了这个报错

检查时节点项目配置是没有错误的。所以就是代码没有拉取成功,所以就想是不是从节点的主机上是没有安装git,导致无法拉取代码。

然后从节点安装git就能正常拉取了

jenkins:> git init  # timeout=10 ERROR: Error cloning remote repo ‘origin‘,大数据,Powered by 金山文档
jenkins:> git init  # timeout=10 ERROR: Error cloning remote repo ‘origin‘,大数据,Powered by 金山文档

Building remotely on slave1 in workspace /root/jenkins/workspace/test-slave1

The recommended git tool is: NONE

using credential aaffde15-b220-49b1-b92a-1c965b31de65

Cloning the remote Git repository

Cloning repository http://192.168.0.51/web/web.git

> git init /root/jenkins/workspace/test-slave1 # timeout=10

ERROR: Error cloning remote repo 'origin'

hudson.plugins.git.GitException: Could not init /root/jenkins/workspace/test-slave1

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1049)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:802)

at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:158)

at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$GitCommandMasterToSlaveCallable.call(RemoteGitImpl.java:151)

at hudson.remoting.UserRequest.perform(UserRequest.java:211)

at hudson.remoting.UserRequest.perform(UserRequest.java:54)

at hudson.remoting.Request$2.run(Request.java:376)

at hudson.remoting.InterceptingExecutorService.lambda$wrap$0(InterceptingExecutorService.java:78)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)

at hudson.remoting.Engine$1.lambda$newThread$0(Engine.java:126)

at java.lang.Thread.run(Thread.java:748)

Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to JNLP4-connect connection from NO4/192.168.0.53:42234

at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1784)

at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:356)

at hudson.remoting.Channel.call(Channel.java:1000)

at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:143)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.base/java.lang.reflect.Method.invoke(Method.java:566)

at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:129)

at com.sun.proxy.$Proxy83.execute(Unknown Source)

at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1225)

at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1308)

at hudson.scm.SCM.checkout(SCM.java:540)

at hudson.model.AbstractProject.checkout(AbstractProject.java:1217)

at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:647)

at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85)

at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:519)

at hudson.model.Run.execute(Run.java:1897)

at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44)

at hudson.model.ResourceController.execute(ResourceController.java:101)

at hudson.model.Executor.run(Executor.java:442)

Caused by: hudson.plugins.git.GitException: Error performing git command: git init /root/jenkins/workspace/test-slave1

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2746)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2660)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2656)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1981)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:1047)

... 12 more

Caused by: java.io.IOException: Cannot run program "git" (in directory "/root/jenkins/workspace/test-slave1"): error=2, 没有那个文件或目录

at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)

at hudson.Proc$LocalProc.<init>(Proc.java:254)

at hudson.Proc$LocalProc.<init>(Proc.java:223)

at hudson.Launcher$LocalLauncher.launch(Launcher.java:997)

at hudson.Launcher$ProcStarter.start(Launcher.java:509)

at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2727)

... 16 more

Caused by: java.io.IOException: error=2, 没有那个文件或目录

at java.lang.UNIXProcess.forkAndExec(Native Method)

at java.lang.UNIXProcess.<init>(UNIXProcess.java:247)

at java.lang.ProcessImpl.start(ProcessImpl.java:134)

at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)

... 21 more

ERROR: Error cloning remote repo 'origin'

Finished: FAILURE

解决办法:

[root@NO4 ~]# yum install -y git #安装git文章来源地址https://www.toymoban.com/news/detail-700089.html

到了这里,关于jenkins:> git init # timeout=10 ERROR: Error cloning remote repo ‘origin‘的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 解决在linux上git clone 时报错 git@gitee.com: Permission denied (publickey). Could not read from remote repo

    今天在gitee上看到一个比较感兴趣的项目,于是就想下载下来研究研究,结果git clone 克隆的时候报错了,报错如下: git@gitee.com: Permission denied (publickey).fatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository exists. Permission denied (publickey) 没有权

    2024年02月11日
    浏览(41)
  • 关于 IntelliJ Maven error: Repository is non-nexus repo, or is not indexed (remote update error) 的问题

    今天用IDEA maven导入github上一个项目的包,报了 无法解析该依赖 的错误 查看 File | Settings | Build, Execution, Deployment | Build Tools | Maven | Repositories 发现(r emote update error )无法更新远程库,报错信息是 IntelliJ Maven error: Repository is non-nexus repo, or is not indexed 在互联网上找了很久的解决

    2024年02月07日
    浏览(29)
  • git clone - error: invalid path

    迁出一个git项目时, 出现以下报错. 这个库在远端服务器已经clone成功了, 这个文件可以浏览, 内容正常. 将远端库的.git Clone到本地时报错, 是不是文件路径太长了呢? 第一感觉就是这样. 本地的迁出路径为 D:3rd_prjcontikicontiki_wiki 已经够短的了, 没有必要再找一个根目录下的更短

    2024年02月08日
    浏览(23)
  • 【git报错】 push git remote: ERROR: committer email address remote

    使用git推送到分支的时候,会有这样报错: gerri push git remote: ERROR: committer email address remote: ERROR: does not match your user accoun   原因是: 本地配置的用户名邮箱配置错误 。(可能是之前拉取过别的仓库的代码)     修改配置方法: 配置用户名 查看已配置的用户名 配置邮箱 查看

    2024年02月16日
    浏览(33)
  • 【Git】关于“git remote: error: hook declined to update”报错的解决

    通过idea进行git提交时,出现 git remote: error: hook declined to update 的报错 仅通过idea中的git报错是无法准确判断具体原因的,只能知道提交被远程仓库拒绝了,但为什么拒绝并不显示 此时,需要在项目所在目录,打开Git Bash,进行手动 git pull 操作 可以看到更加详细的报错信息,然

    2024年02月15日
    浏览(32)
  • git clone项目报错,The requested URL returned error: 500

    git clone项目报错,The requested URL returned error: 500,如何解决?试试修改电脑中存储的账号密码 有项目权限,至少在网页上能通过链接访问当前Git内容 曾在当前电脑登录过git账号 满足以上两种情况,但执行git clone时却报错The requested URL returned error: 500 在Windows系统中试试以下方法

    2024年02月12日
    浏览(40)
  • 【git clone error:no matching key exchange method found】

    拉起项目代码报错 git clone ssh://uidxxx@gerrit-xxxxxxxx Cloning into ‘xxxxx’… Unable to negotiate with xxx.xx.xxx.ip port xxxxx: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 fatal: Could not read from remote repository. //无法读取远程仓库 未找到匹配的密钥交换方法,不

    2024年02月12日
    浏览(35)
  • Git error:‘fatal: Couldn‘t find remote ref master‘

    如果出现该错误提示,可能是因为使用了旧命令: master现在被认为是有种族歧视的,github将其换成了 main ,所以现在使用pull可以写为: 如需要将已有repos的 master 换为 main ,可依照以下步骤: 1-重命名本地分支: 2-重命名远程分支 3-删除远程分支 master 4-告知团队中的其他人

    2024年02月09日
    浏览(32)
  • 「震惊」git error: Cloning into ‘‘... fatal: unable to access ‘https:……“

    最近在使用git,在使用git clone的时候出现了一些莫名其妙的问题,解决之后决定把它记录下来,方便git初学者。 1、问题描述 2、解决方法 1、问题描述 在git clone的时候出现如下问题: 2、解决方法 参考博文:git报错 fatal error 解决方法 产生原因:一般是这是因为服务器的SSL证

    2024年02月11日
    浏览(39)
  • 完美解决ubuntu中git clone安卓内核时报error: RPC failed; curl 56 GnuTLS recv error (-9):错误的处理

    在ubuntu中使用git命令从清华的开源软件镜像站中克隆安卓内核,但是报如下错误: 查询了一些博客,这个错误总结出应该是文件过大的原因 根据参考1中的第一个问题的方法,分别执行如下命令,问题解决: 其中,postBuffer是用于设置Http缓存,可以设置的大一些,比如1G:g

    2024年01月19日
    浏览(32)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包