问题描述
我安装了jenkins,将jenkins.war上传到我的tomcat,在windows中,并安装了它的git插件,我完成了ssh密钥的所有过程,并且我已经能够在bitbucket中成功地推送并添加到我的git repo中从cmd,但我还没有能够从詹金斯做到这一点,这是发生在我身上的奇怪的东西:
-
我可以从git批处理中执行任何操作,但是可以从cmd执行同样的操作,我必须以管理员身份打开它。
-
eval命令不能从cmd中运行。
-
我在jenkins git插件安装中提到了返回的状态码128:异常Windows手册,而不是得到致命的:远程挂起意外错误我得到E:\ Tomcat不被识别为内部或外部命令
ul>
以下例外:
从[email protected]获取上游变更rg:mycompany / myrepo.git
> C:\程序文件(x86)\Git\\\\\\\\\\\\\\\ git.exe --version#timeout = 10
使用GIT_SSH设置凭据SRVSYMPHONY SSH
> C:\ Program Files(x86)\Git\bin\git.exe fetch --tags --progress [email protected]:mycompany / myrepo.git + refs / heads / *:refs / remotes / origin / *
FATAL:无法从[email protected]获取:myCompany中/ myrepo.git
hudson.plugins.git.GitException:无法获取来自[email protected]:myCompany中/ myrepo.git在hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:627)
在hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:865)
在hudson.plugins .git.GitSCM.checkout(GitSCM.java:890)
在hudson.model.AbstractProject.checkout(AbstractProject.java:1255)
在hudson.model.AbstractBuild $ AbstractBuildExecution.defaultCheckout(AbstractBuild.java :624)处哈德森hudson.model.AbstractBuild $ AbstractBuildExecution.run(AbstractBuild.java:530)
jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
。 model.Run.execute(Run.java:1740)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:233)
引起:hudson.plugins.git。 GitException:命令C:\ Program Files(x86)\Git\bin\git.exe fetch --tags --progress [email protected]:mycompany / myrepo.git + refs / heads / *:refs / remotes / origin / *返回状态码128:
stdout:
stderr:E:\Tomcat不支持共享内部文件,
文件夹ejecutable。
致命:无法从远程存储库读取。
你知道我发生了什么吗?
https://< user>:< pass> @ bitbucket.org /< user> / < project> .git
答案在这个问题中:
谢谢
I installed jenkins uploading the jenkins.war to my tomcat, in windows, and installed it the git plugin, I did all the procedures for the ssh key and I have been able to succesfully push and pull to my git repo in bitbucket from the cmd, but I haven't still been able to do it from jenkins, here are the weird stuff that happened to me:
I can do push and pull and execute anything from git batch but to be able to do the same from the cmd I have to open it as administrator.
The eval command doesn't work from the cmd.
I get the "returned status code 128:" exception mentioned on the jenkins git plugin installation for windows manual, but instead of getting the "fatal: The remote end hung up unexpectedly" error I get "E:\Tomcat not recognized as an internal or external command"
Here's the exception:
Fetching upstream changes from [email protected]:mycompany/myrepo.git
> C:\Program Files (x86)\Git\bin\git.exe --version # timeout=10
using GIT_SSH to set credentials SRVSYMPHONY SSH
> C:\Program Files (x86)\Git\bin\git.exe fetch --tags --progress [email protected]:mycompany/myrepo.git +refs/heads/*:refs/remotes/origin/*
FATAL: Failed to fetch from [email protected]:mycompany/myrepo.git
hudson.plugins.git.GitException: Failed to fetch from [email protected]:mycompany/myrepo.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:627)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:865)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:890)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1255)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:624)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:530)
at hudson.model.Run.execute(Run.java:1740)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:233)
Caused by: hudson.plugins.git.GitException: Command "C:\Program Files (x86)\Git\bin\git.exe fetch --tags --progress [email protected]:mycompany/myrepo.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: "E:\Tomcat" no se reconoce como un comando interno o externo,
programa o archivo por lotes ejecutable.
fatal: Could not read from remote repository.
Do you know whats happening to me?
Thanks
In order to be able to connect to my private repo in bitbicket I had to add the password to the url this way:
https://<user>:<pass>@bitbucket.org/<user>/<project>.git
The answer was in this question:
Using Jenkins with a private BitBucket Git repository
Thanks
这篇关于无法使用jenkins从windows中的tomcat安装中使用git连接到bitbucket的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!