•  
      request #9678 Hudson Can't clone from GIT
    Infos
    #9678
    Kelly Ferrone (kferrone)
    2016-11-26 08:53
    2016-11-25 22:41
    9956
    Details
    Hudson Can't clone from GIT

    Almost have Hudson totally integrated. The issue is when I run a build, Hudson can't clone the repo because it can't find the SSH key. I can't find any docs on how to let Hudson have it's own key. I've found docs about other people using gitolite and Hudson but none seemed to work for Tuleap. 

    So far I added the public key from the Hudson user as a authorized key on the Tuleap servers ROOT and I logged in as "Admin" and added the keys to that as well. 

    Here is the error I get from Hudson while trying to connect to gitolite in Tuleap:

    Started by user myuser
    Checkout:workspace / /opt/tomcat/.hudson/jobs/project-build/workspace - hudson.remoting.LocalChannel@45e51f4c
    Using strategy: Default
    Git Exe: /usr/bin/git
    Checkout:workspace / /opt/tomcat/.hudson/jobs/project-build/workspace - hudson.remoting.LocalChannel@45e51f4c
    Fetching changes from the remote Git repository
    Fetching upstream changes from ssh://gitolite@tuleap.mysite.com/my-tuleap-project/my-project.git
    ERROR: Problem fetching from origin / origin - could be unavailable. Continuing anyway
    hudson.plugins.git.GitException: Error performing command: /usr/bin/git fetch -t ssh://gitolite@tuleap.mysite.com/my-tuleap-project/my-project.git +refs/heads/*:refs/remotes/origin/*
    Command "/usr/bin/git fetch -t ssh://gitolite@tuleap.mysite.com/my-tuleap-project/my-project.git +refs/heads/*:refs/remotes/origin/*" returned status code 128: Host key verification failed.
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    Continuous Integration
    9.1
    CentOS 6
    • [ ] enhancement
    • [x] internal improvement
    Empty
    Stage
    Empty
    Closed
    2016-11-26
    Attachments
    Empty
    References
    References list is empty

    Follow-ups

    User avatar
    Glad you figured it out by yourself! :)

    I'm closing the request then.

    • Status changed from New to Closed
    • Close date set to 2016-11-26
    User avatar

    OK so now I have the SSH working, the issue was hudson was running on a special Tomcat user who actually had the right SSH key.