젠토킨으로 gitolite 작업을하기 위해 며칠 동안 노력했습니다. 서버에서 호스트 된 repos와 Jenkins와 작업 할 수 있습니다. 동일한 절단기).jenkins와 gitolite를 성공적으로 작동 시키려고 시도합니다. - 권한이 거부되었습니다 (publickey, password).
나는 gitolite가 작동하지만 SSH에 문제가 있다고 생각합니다. 채팅에 대한 도움을 받고 jenkins/.ssh에 개인 키를 추가했습니다.
나는 gitolite를 호스팅하는 "git"사용자가 있는데, 사용자 "gitolite"와 "jenkins"사용자가 있습니다. git clone [email protected]를 사용하여 저장소를 복제 할 수 있습니다. 매트릭스
하지만 젠킨스에서는 사용할 수 없습니다. 나는 이것을 만들려고 할 때 이것을 얻는다. 다음 "ssh를 -v 자식 @ 서버"나는이 얻을 입력 젠킨스 -
Checkout:workspace//var/lib/jenkins/jobs/Matrix/workspace -
[email protected]
Using strategy: Default
Checkout:workspace//var/lib/jenkins/jobs/Matrix/workspace -
[email protected]
Cloning the remote Git repository
Cloning repository origin
ERROR: Error cloning remote repo 'origin' : Could not clone [email protected]:Matrix
ERROR: Cause: Error performing command: git clone --progress -o origin [email protected]:Matrix /var/lib/jenkins/jobs/Matrix/workspace
Command "git clone --progress -o origin [email protected]:Matrix
/var/lib/jenkins/jobs/Matrix/workspace" returned status code 128: Cloning into /var/lib/jenkins/jobs/Matrix/workspace...
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,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:1042)
at hudson.plugins.git.GitSCM$2.invoke(GitSCM.java:968)
at hudson.FilePath.act(FilePath.java:758)
at hudson.FilePath.act(FilePath.java:740)
at hudson.plugins.git.GitSCM.checkout(GitSCM.java:968)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1193)
at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:566)
at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:454)
at hudson.model.Run.run(Run.java:1376)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:230)
나는 내 서버와 스와로 로그인합니다.
[email protected]:~$ sudo su - jenkins
[email protected]:~$ ssh -v [email protected]
OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Applying options for *
debug1: Connecting to server [127.0.1.1] port 22.
debug1: Connection established.
debug1: identity file /var/lib/jenkins/.ssh/id_rsa type -1
debug1: identity file /var/lib/jenkins/.ssh/id_rsa-cert type -1
debug1: identity file /var/lib/jenkins/.ssh/id_dsa type -1
debug1: identity file /var/lib/jenkins/.ssh/id_dsa-cert type -1
debug1: identity file /var/lib/jenkins/.ssh/id_ecdsa type -1
debug1: identity file /var/lib/jenkins/.ssh/id_ecdsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.8p1 Debian-1ubuntu3
debug1: match: OpenSSH_5.8p1 Debian-1ubuntu3 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.8p1 Debian-1ubuntu3
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: sending SSH2_MSG_KEX_ECDH_INIT
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ECDSA f3:ab:a6:55:83:98:c5:4f:85:c6:70:be:2f:40:1f:65
debug1: Host 'server' is known and matches the ECDSA host key.
debug1: Found key in /var/lib/jenkins/.ssh/known_hosts:3
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: /var/lib/jenkins/.ssh/id_rsa
debug1: read PEM private key done: type RSA
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /var/lib/jenkins/.ssh/id_dsa
debug1: Trying private key: /var/lib/jenkins/.ssh/id_ecdsa
debug1: Next authentication method: password
[email protected]'s password:
아직 암호를 묻습니다. 누구든지이 작업을 수행 했습니까? 젠장이 젠킨스와 일하는거야? 어떤 도움을 주셔서 감사 드리며 기꺼이 10 달러 (비자 카드)를 기부하여이 문제를 해결할 수있게 도와드립니다!
는
SSH 로그에 따르면 개인 키 'id_rsa'가 서버에 허용되지 않습니다. gitolite가 개인 키와 일치하는 공개 키를 가지고 있고 gitolite가 ~/git/.ssh/authorized_keys 파일을 해당 키로 올바르게 업데이트했는지 확인하십시오. –
답변 해 주셔서 감사합니다! 지금 당장이 문제를 조사하고 있지만이 문제를 해결할 방법이 확실하지 않습니다. 젠킨스에서는 빌드를 만들 수는 없지만 어떻게 생각하는지 모르겠습니다. 내 성냥갑 프로가 있는데 내 서버에 액세스하려고하면 ssh e-ject.se를 작성한다고 가정합니까? 인증이 필요합니까? 서버에 내 아이맥, 서버에 맥북, 젠킨스? 그리고 gitolite? 우분투에서 나의 주요 사용자 인 git 사용자를 얻었습니다. git clone [email protected]를 사용할 수 있습니다 : 행렬을 받아 들일 수 있습니까? 그러나 jenkins는 이것을 수용하고 복제해야합니까? 답변에 대해 매우 감사 드리며 기부 약속을 지킵니다. (비자 카드 신청) Joniz – Jonathan
나는이 안내서를 종료하고 대신이 안내서를 시험해 보겠습니다! http://www.nomachetejuggling.com/2011/07/31/ubuntu-tomcat-jenkins-git-ssh-togethe/ 어떻게 진행되는지 알려주세요. – Jonathan