我不知道这意味着什么,有人可以解释问题是什么以及解决方案是什么。
我被困在这里几天了。 我想在Azure上的虚拟机上运行测试。 我已经更新了所有Jenkins插件。 我在ssh隧道中使用Putty
这是我要运行构建时获得的控制台输出:
Started by user admin
Building remotely on testadminjenkinsazure277db0 (ubuntu) in workspace /home/Jenkinsadmin/workspace/DemoProject5
Cloning the remote Git repository
Cloning repository https://github.com/jankojanko123/my-app.git
> C:\Program Files\Git\cmd\git.exe init /home/Jenkinsadmin/workspace/DemoProject5 # timeout=10
ERROR: Error cloning remote repo 'origin'
hudson.plugins.git.GitException: Could not init /home/Jenkinsadmin/workspace/DemoProject5
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:787)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:579)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:153)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler$1.call(RemoteGitImpl.java:146)
at hudson.remoting.UserRequest.perform(UserRequest.java:212)
at hudson.remoting.UserRequest.perform(UserRequest.java:54)
at hudson.remoting.Request$2.run(Request.java:369)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
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 java.lang.Thread.run(Thread.java:748)
Suppressed: hudson.remoting.Channel$CallSiteStackTrace: Remote call to testadminjenkinsazure277db0
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)
at hudson.remoting.UserRequest$ExceptionResponse.retrieve(UserRequest.java:357)
at hudson.remoting.Channel.call(Channel.java:955)
at org.jenkinsci.plugins.gitclient.RemoteGitImpl$CommandInvocationHandler.execute(RemoteGitImpl.java:146)
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:132)
at com.sun.proxy.$Proxy222.execute(Unknown Source)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1146)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1186)
at hudson.scm.SCM.checkout(SCM.java:504)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
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:1810)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Caused by: hudson.plugins.git.GitException: Error performing command: C:\Program Files\Git\cmd\git.exe init /home/Jenkinsadmin/workspace/DemoProject5
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2023)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1984)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1980)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1612)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$5.execute(CliGitAPIImpl.java:785)
... 11 more
Caused by: java.io.IOException: Cannot run program "C:\Program Files\Git\cmd\git.exe" (in directory "/home/Jenkinsadmin/workspace/DemoProject5"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1048)
at hudson.Proc$LocalProc.<init>(Proc.java:249)
at hudson.Proc$LocalProc.<init>(Proc.java:218)
at hudson.Launcher$LocalLauncher.launch(Launcher.java:936)
at hudson.Launcher$ProcStarter.start(Launcher.java:455)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2012)
... 15 more
Caused by: java.io.IOException: error=2, No such file or directory
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)
... 20 more
ERROR: Error cloning remote repo 'origin'
Finished: FAILURE
答案 0 :(得分:0)
错误提示:$dbh = new PDO('mysql:host=127.0.0.1;dbname=eventdb;charset=utf8', 'root',
'');
$dbh -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = "SELECT ed_020_bereich.ED_KBID, ed_020_bereich.BR_Bereich
FROM ed_020_bereich
WHERE ed_020_bereich.BR_active = 1 AND ed_020_bereich.ED_KID = :ED_KID
ORDER BY ed_020_bereich.BR_Bereich";
$stmt = $dbh->prepare($sql);
$stmt->bindParam(':ED_KID', $kunde);
$stmt->execute();
$stmt->setFetchMode(PDO::FETCH_ASSOC);
$return = array();
while($row = $stmt->fetch())
{
$return[]=$row;
}
。这意味着您没有安装git(或者至少没有在此路径中安装)。您需要安装它。
答案 1 :(得分:0)
似乎是在远程Ubuntu代理(在/home/Jenkinsadmin/workspace/DemoProject5
工作区中)上构建Jenkins作业,但是您已将Git路径定义为Windows文件夹(C:\Program Files\Git\cmd\git.exe
)。因此,您需要在Ubuntu上安装Git并为其设置正确的路径(Linux风格)。
答案 2 :(得分:0)
在“全局工具配置”中提供完整的路径,包括git.exe .....就我而言,它是C:\ Program Files \ Git \ bin \ git.exe。我在离开程序名称时遇到了相同的错误:C:\ Program Files \ Git \ bin \