Jenkins,在检索Git repo的代码时构建错误

时间:2015-07-02 14:26:22

标签: git jenkins

我在Jenhat Linux机器上安装了Jenkins。

我在Jenkins安装了所有git插件。

我已通过/usr/bin/git在服务器上安装了Git。看起来可执行文件位于git.exe(Jenkins不会认识Building in workspace /root/.jenkins/jobs/test/workspace /usr/bin/git rev-parse --is-inside-work-tree # timeout=10 Fetching changes from the remote Git repository /usr/bin/git config remote.origin.url git clone ssh://b002653@teamforge.server:29418/cdn_scdn # timeout=10 Fetching upstream changes from git clone ssh://b002653@teamforge.server:29418/cdn_macys_scdn /usr/bin/git --version # timeout=10 /usr/bin/git fetch --tags --progress git clone ssh://b002653@teamforge.server:29418/cdn_scdn +refs/heads/*:refs/remotes/origin/* ERROR: Error fetching remote repo 'origin' hudson.plugins.git.GitException: Failed to fetch from git clone ssh://b002653@teamforge.server:29418/cdn_macys_scdn at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:735) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:983) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1016) 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 "/usr/bin/git fetch --tags --progress git clone ssh://b002653@teamforge.server:29418/cdn_macys_scdn +refs/heads/*:refs/remotes/origin/*" returned status code 128: stdout: stderr: fatal: I don't handle protocol 'git clone ssh' at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1591) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1379) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:86) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:324) at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:733) ... 11 more ERROR: Error fetching remote repo 'origin' Finished: FAILURE )。

我们通过TeamForge进行内部Git回购。 (我成功连接到github仓库,与我们公司的Git仓库有问题。)

任何人都可以帮我连接内部Git仓库吗?错误日志如下所示:

scope : 'A',
require : 'ngModel',
link : function(scope, el, attr, ngModel) {
        el.bind('change', function(e) {
            scope.file = (e.srcElement || e.target).files[0];
            scope.ngModel.$setViewValue(scope.file);
            scope.ngModel.$render();
        });
}

2 个答案:

答案 0 :(得分:0)

看起来您已将git clone ssh://b002653@teamforge.server:29418/...粘贴到结帐工作中,而不是ssh://b002653@teamforge.server:29418/...

答案 1 :(得分:0)

确保您提供正确的 Git可执行文件路径 在我的情况下,它就像轰鸣声enter image description here 另一个错误可以看出你提供了 git clone 和你的网址 正如您在控制台中看到的那样fatal: I don't handle protocol 'git clone ssh'

因此您需要提供ssh://b002653@teamforge.server:29418/cdn_scdn enter image description here

我希望它能完成这项工作