大家,
我有一些与jenkins和git有关的问题。我在本地服务器中创建了一个新用户,并创建了一个空的git仓库。我在另一台机器上使用jenkins来轮询本地服务器中的更改并跟踪更改。我在本地服务器中添加了ssh授权密钥,用于直接连接服务器和使用jenkins在计算机中连接,我有一个配置文件通过服务器访问身份。但我总是得到这个错误,我不确定问题是什么。
任何人都可以帮助我。
Building in workspace /var/lib/jenkins/jobs/MultiCom Git/workspace
Checkout:workspace / /var/lib/jenkins/jobs/MultiCom Git/workspace - hudson.remoting.LocalChannel@e941c2
Using strategy: Default
Checkout:workspace / /var/lib/jenkins/jobs/MultiCom Git/workspace - hudson.remoting.LocalChannel@e941c2
GitAPI created
Cloning the remote Git repository
Cloning repository origin
$ /usr/bin/git clone -o origin gituser@192.168.22.112:/home/gituser/Git/multicom/multicom.git "/var/lib/jenkins/jobs/MultiCom Git/workspace"
ERROR: Error cloning remote repo 'origin' : Could not clone gituser@192.168.22.112:/home/gituser/Git/multicom/multicom.git
ERROR: Cause: Error performing /usr/bin/git clone -o origin gituser@192.168.22.112:/home/gituser/Git/multicom/multicom.git /var/lib/jenkins/jobs/MultiCom Git/workspace
Command returned status code 128: Cloning into /var/lib/jenkins/jobs/MultiCom Git/workspace...
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
fatal: The remote end hung up unexpectedly
Trying next repository
ERROR: Could not clone repository
FATAL: Could not clone
hudson.plugins.git.GitException: Could not clone
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:809)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:740)
at hudson.FilePath.act(FilePath.java:784)
at hudson.FilePath.act(FilePath.java:766)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:740)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1195)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:576)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:465)
at hudson.model.Run.run(Run.java:1404)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:238)
答案 0 :(得分:0)
确保为jenkins正在运行的用户设置了密钥。尝试从框中做一个克隆,作为jenkins用户并尝试。看看是否发生了简单的ssh。使用-v
(详细)输出来查看发生的情况。