我安装了jenkins,在Windows中将jenkins.war上传到我的tomcat,并安装了git插件,我完成了ssh密钥的所有过程,而且我能够成功地从cmd推入并拖入bitbucket中的git repo ,但我仍然无法通过詹金斯做到这一点,这是发生在我身上的怪异事物:
我可以执行git batch的推拉操作并执行任何操作,但是要能够通过cmd执行相同操作,我必须以管理员身份打开它。
eval命令在cmd中不起作用。
我得到了针对Windows手册的jenkins git插件安装上提到的“返回状态码128:”异常,但没有得到“致命的:远程端意外挂起”错误,而是得到了“ E:\ Tomcat不被识别为内部错误”。或外部命令”
这是例外:
Fetching upstream changes from git@bitbucket.org: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 git@bitbucket.org:mycompany/myrepo.git +refs/heads/*:refs/remotes/origin/* FATAL: Failed to fetch from git@bitbucket.org:mycompany/myrepo.git hudson.plugins.git.GitException: Failed to fetch from git@bitbucket.org: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 git@bitbucket.org: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.
你知道我怎么了吗
谢谢
为了能够在bitbicket中连接到我的私人仓库,我必须通过以下方式将密码添加到url中:
https://<user>:<pass>@bitbucket.org/<user>/<project>.git
答案是这个问题:
将Jenkins与私有BitBucketGit存储库一起使用 谢