1. 程式人生 > >Jenkins-Git trouble shooting

Jenkins-Git trouble shooting

目標:在jenkins上搭建git的project並能執行dummy.bat和dummy.sh

建立slave之後,建立.ssh之後,在slave上成功git clone repository,但在jenkins上無法clone

Started by user anonymous
Building remotely on Moyummy_Slave (Moyummy) in workspace C:\JenkinsWorkspace\Moyummy_Build
Cloning the remote Git repository
Cloning repository [email protected]
:Moyummy/Moyummy.git > git init C:\JenkinsWorkspace\Moyummy_Build # timeout=10 ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Could not init C:\JenkinsWorkspace\Moyummy_Build at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:656) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.
execute(CliGitAPIImpl.java:463) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) at hudson.remoting.UserRequest.perform(UserRequest.java:121
) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:325) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:69) at java.lang.Thread.run(Unknown Source) at ......remote call to Moyummy_Slave(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1361) at hudson.remoting.UserResponse.retrieve(UserRequest.java:221) at hudson.remoting.Channel.call(Channel.java:753) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:145) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.invoke(RemoteGitImpl.java:131) at com.sun.proxy.$Proxy93.execute(Unknown Source) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1058) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1098) at hudson.scm.SCM.checkout(SCM.java:485) at hudson.model.AbstractProject.checkout(AbstractProject.java:1282) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532) at hudson.model.Run.execute(Run.java:1744) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) Caused by: hudson.plugins.git.GitException: Error performing command: git init C:\JenkinsWorkspace\Moyummy_Build at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1726) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1695) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1691) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1321) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:654) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:463) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:152) at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:145) at hudson.remoting.UserRequest.perform(UserRequest.java:121) at hudson.remoting.UserRequest.perform(UserRequest.java:49) at hudson.remoting.Request$2.run(Request.java:325) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at hudson.remoting.Engine$1$1.run(Engine.java:69) at java.lang.Thread.run(Unknown Source) Caused by: java.io.IOException: Cannot run program "git" (in directory "C:\JenkinsWorkspace\Moyummy_Build"): CreateProcess error=2, The system cannot find the file specified

在slave的設定裡tools location新增git(default)的路徑C:\Program Files\Git\bin\git.exe

Started by user anonymous
Building remotely on Moyummy_Slave (Moyummy) in workspace C:\JenkinsWorkspace\Moyummy_Build
 > C:\Program Files\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > C:\Program Files\Git\bin\git.exe config remote.origin.url [email protected]:Moyummy/Moyummy.git # timeout=10
Fetching upstream changes from [email protected]:Moyummy/Moyummy.git
 > C:\Program Files\Git\bin\git.exe --version # timeout=10
 > C:\Program Files\Git\bin\git.exe -c core.askpass=true fetch --tags --progress [email protected]:Moyummy/Moyummy.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from [email protected]:Moyummy/Moyummy.git
    at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:810)
    at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1067)
    at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1098)
    at hudson.scm.SCM.checkout(SCM.java:485)
    at hudson.model.AbstractProject.checkout(AbstractProject.java:1282)
    at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:610)
    at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
    at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:532)
    at hudson.model.Run.execute(Run.java:1744)
    at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
    at hudson.model.ResourceController.execute(ResourceController.java:98)
    at hudson.model.Executor.run(Executor.java:374)
Caused by: hudson.plugins.git.GitException: Command "C:\Program Files\Git\bin\git.exe -c core.askpass=true fetch --tags --progress [email protected]:Moyummy/Moyummy.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout: 
stderr: Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

在services裡找到jenkins slave的service,切換到域賬戶
jenkins slave -> properties -> log on -> this account裡填寫放.ssh的賬戶

Started by user anonymous
Building remotely on Moyummy_Slave (Moyummy) in workspace C:\JenkinsWorkspace\Moyummy_Build
 > C:\Program Files\Git\bin\git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > C:\Program Files\Git\bin\git.exe config remote.origin.url [email protected]:Moyummy/Moyummy.git # timeout=10
Fetching upstream changes from [email protected]:Moyummy/Moyummy.git
 > C:\Program Files\Git\bin\git.exe --version # timeout=10
 > C:\Program Files\Git\bin\git.exe -c core.askpass=true fetch --tags --progress [email protected]:Moyummy/Moyummy.git +refs/heads/*:refs/remotes/origin/*
Seen branch in repository origin/master
Seen 1 remote branches
Checking out Revision bb2437a933ccb8ffdeb7c85ebd2ab1b29223e4b6 (origin/master)
 > C:\Program Files\Git\bin\git.exe config core.sparsecheckout # timeout=10
 > C:\Program Files\Git\bin\git.exe checkout -f bb2437a933ccb8ffdeb7c85ebd2ab1b29223e4b6
 > C:\Program Files\Git\bin\git.exe rev-list bb2437a933ccb8ffdeb7c85ebd2ab1b29223e4b6 # timeout=10
Run condition [And] enabling prebuild for step [BuilderChain]
No emails were triggered.
[Moyummy_Build] $ sh -xe C:\Users\itools\AppData\Local\Temp\hudson5399523776494841655.sh
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: Cannot run program "sh" (in directory "C:\JenkinsWorkspace\Moyummy_Build"): CreateProcess error=2, The system cannot find the file specified
set path
Path=C:\Ruby22-x64\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;"C:\Program Files\Git\cmd";"C:\Program Files\Git\bin"

把雙引號去掉

set path
Path=C:\Ruby22-x64\bin;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Git\cmd;C:\Program Files\Git\bin

神奇,ok了

相關推薦

Jenkins-Git trouble shooting

目標:在jenkins上搭建git的project並能執行dummy.bat和dummy.sh 建立slave之後,建立.ssh之後,在slave上成功git clone repository,但在jenkins上無法clone Started by u

CentOS6.8 部署Tomcat+jenkins+git+maven 持續集成

jenkinsCentOS6.8 部署Tomcat+jenkins+git+maven 持續集成一、環境介紹: 1、操作系統:CentOS 6.8 IP:192.168.1.100 2、JDK版本:jdk1.8.0_101 3、Tomcat版本:tomcat-9.0.0.M21 4、

CentOS7.0 部署Tomcat+jenkins+git+maven+ant

jenkins此篇獻給初學者一、環境介紹: 1、操作系統:CentOS 7.0 IP:192.168.137.128 2、JDK版本:jdk1.8.0_101 3、Tomcat版本:tomcat-9.0.0.M21 4、jenkins版本: Jenkins ver. 2.46.3

Jenkins+git+maven 打包構建部署

jenkins本文出自 “清風柳絮” 博客,請務必保留此出處http://binuu.blog.51cto.com/801317/1944493Jenkins+git+maven 打包構建部署

Jenkins + Git + Maven + tomcat集成環境搭建

jenkins git maven 折騰了好幾天,終於吧Jenkins + Git + Maven + tomcat集成環境搭建起來了,最終主要實現“自動構建、部署”web應用。 1、安裝環境 操作系統:Centos 6.5 JDK:1.7.x Maven:3.1.x Gi

matlab2016b -ubuntu 1604 -install- and -trouble -shooting--finally-all is ok!!

5.1 sun pan -i 正常的 圖標 找不到 src dao Linux系統下安裝matlab2016b 標簽: ubuntumatlablinux 2016-09-24 22:11 16203人閱讀 評論(22) 收藏 舉報 分類: li

jenkins git公有倉庫與私有倉庫發布代碼

jenkins 基礎配置安裝(ⅱ)1 發布php代碼- jenkins已經搭建完成,現在開始來做一個php發布代碼的任務- 在發布php代碼時先看看是否有兩個插件在系統管理-管理插件- 已安裝插件- 檢查是否有“Git plugin”和“Publish Over SSH”兩個插件,如果沒有,則需點擊“可選插件

jenkins git】Failed to connect to repository:Error performing command:git.exe ls-remote-h

strong src command for error file 管理 conf blank jenkins使用git源碼管理報錯:Failed to connect to repository:Error performing command:git.exe ls-re

jenkins+git+maven搭建自動化部署項目環境(轉)

operator 作用 主服務器 裏的 tag regexp vra 缺失 內容 知識背景 首先需要理解的是,Jenkins是幫我們將代碼進行統一的編譯打包、還可以放到tomcat容器中進行發布。 意思是我們通過配置,將以前:編譯、打包、上傳、部署到Tomcat中的過程交由

實戰docker+jenkins+git構建持續集成環境

docker jenkins docker+jenkins+git git 本文重點介紹jenkins以及讓jenkins如何實現在docker容器中運行。jenkins和docker私有倉庫又是怎麽結合的。docker說明及安裝和git說明及安裝在本文中不會特別詳細的介紹。 ?並且,在本文中

[Trouble Shooting - Python] TypeError: 'builtin_function_or_method' object is not subscriptable

function rand ID opera type PE typeerror table AC 1. Background: python 3/win10 2. Error Line: idx = nums.index[target-operand1] 3. Sol

【轉】docker+jenkins+git持續部署實踐

ref workspace 重要 star ng- 匿名 web del 目錄 寫在前面 以前搭建spring-cloud的時候 看到別人代碼裏面總有Dockerfile,然後了解到docker容器的概念,玩了兩個星期玩不下去了,就放下了,無意間在網上看到一篇文章Docke

win10+jenkins+git+自動發布(搭建+構建)

安裝 mar str .net war包 技術分享 scp jar包 fill 1.下載jenkins https://jenkins.io/download/ 直接百度jenkins 進行下載 我一般是直接下載最新的 這裏已windows為例 下載成功後 會給到你一個壓

jenkins + Git 搭建持續集成環境

lds pos apach plugin 更換 htm 共享目錄 parse 段落 持續集成通過自動化構建、自動化測試以及自動化部署加上較高的集成頻率保證了開發系統中的問題能迅速被發現和修復,降低了集成失敗的風險,使得系統在開發中始終保持在一個穩定健康的集成狀態。jenki

jenkins--Jenkins+Git+codding+maven 實現自動化測試持續集成

保存 app nbsp 添加 設置環境變量 webapp 系統管 text lan x1.打開Jenkins官網,下載jenkins.war https://jenkins.io/download/ 2.將該war包直接放置到Tomcat的webapp

docker-swarm+jenkins+git+harbor+spring-boot實現CI/CD

今天給大家帶來一篇CI/CD的文章,我是使用swarm做的docker叢集,Harbor作為映象倉庫,git作為程式碼、配置倉庫,jenkins就是釋出啦,由於之前寫過jenkins在swarm叢集下搭建過程,這裡不做說明了,Harbor需要自己事先安裝好(或者公有云,還免費) 開始吧:

Jenkins+Git+Gitlab+Ansible實現持續整合自動化部署靜態網站(一)--技術流ken

  前言   在之前已經寫了關於Git,Gitlab以及Ansible的兩篇部落格《Git+Gitlab+Ansible劇本實現一鍵部署Nginx--技術流ken》,《Git+Gitlab+Ansible劇本實現一鍵部署動態網站(二)--技術流ken》,以及關於jenkins的簡單使

Jenkins+Git+Gitlab+Ansible實現持續集成自動化部署靜態網站(一)--技術流ken

del 自動 form 節點 註意 git clone 使用 藍色 工作 前言 在之前已經寫了關於Git,Gitlab以及Ansible的兩篇博客《Git+Gitlab+Ansible劇本實現一鍵部署Nginx--技術流ken》,《Git+Gitlab+Ans

Jenkins+Git+Gitlab+Ansible實現持續整合自動化部署動態網站(二)--技術流ken

  專案前言   在上一篇部落格《Jenkins+Git+Gitlab+Ansible實現持續化整合一鍵部署靜態網站(一)--技術流ken》中已經詳細講解了如何使用這四個工具來持續整合自動化部署一個靜態的網站。 如果大家可以熟練掌握以上內容,勢必會在工作中減輕不小的工作量。 本篇

centos7下安裝配置jenkins+git+maven+jdk

環境 centos7 jdk1.8 maven3 git   在安裝jenkins之前,先安裝jdk1.8、maven、git   一、 安裝jdk1.8 第一步:下載 jdk-8u131-linux-x64.tar.gz 下載網址:https://www.o