我一直在使用Git一段时间。Jenkins和Git配置问题
最近,我已经开始探索Jenkins,并设法使用本地Windows安装程序进行设置。我在本地系统上创建了一个示例项目,并成功使用Jenkins构建它。
现在,我在远程服务器上有一个项目,我想让詹金斯使用Git来拉代码。
我做了以下内容:
1)安装了Git的插件。
2)在詹金斯>管理詹金斯>配置系统> GIT中> GIT中的安装 -
[也尝试C:\程序文件(x86)\ GIT中\ CMD \ gitk.cmd代替.... \ git.exe]
3)下的试验项目>配置
4)最后,试图建立它。但总是会出现超时错误,然后失败。
Started by user anonymous
Building in workspace C:\Program Files (x86)\Jenkins\workspace\GitTest
> C:\Program Files (x86)\Git\cmd\git.exe rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> C:\Program Files (x86)\Git\cmd\git.exe config remote.origin.url ssh://[email protected]<the-url-to-the-server>demo_android.git # timeout=10
Fetching upstream changes from ssh://[email protected]<the-url-to-the-server>demo_android.git
> C:\Program Files (x86)\Git\cmd\git.exe --version # timeout=10
> C:\Program Files (x86)\Git\cmd\git.exe fetch --tags --progress ssh://[email protected]<the-url-to-the-server>demo_android.git +refs/heads/*:refs/remotes/origin/* # timeout=60
FATAL: Failed to fetch from ssh://[email protected]<the-url-to-the-server>demo_android.git
hudson.plugins.git.GitException: Failed to fetch from ssh://[email protected]<the-url-to-the-server>demo_android.git
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:647)
at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:889)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:914)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1258)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:622)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:528)
at hudson.model.Run.execute(Run.java:1759)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Caused by: hudson.plugins.git.GitException: Command "C:\Program Files (x86)\Git\cmd\git.exe fetch --tags --progress ssh://[email protected]<the-url-to-the-server>demo_android.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
stdout:
stderr: ssh: connect to host git.us1.adeptra.com port 7999: Bad file number
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1435)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1223)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:85)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:280)
at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:645)
... 10 more
我在做什么错?我需要提供凭据吗? (我试过它也失败了)
你能做出'混帐取--tags --progress SSH -
通过在链接中的说明删除了密码您的本地计算机上的服务器> demo_android.git'? – mithrop 2014-10-30 08:15:18
是的。我导航到特定的目录并执行命令。像往常一样,它要求密码,然后继续并尝试获取 – senchaDev 2014-10-30 08:29:38