2

I'm using Git-parameter plugin into Jenkins to build specific tag/branches. It was correctly working but now (not sure it's following and update or something) it's failing in a strange way:

  • If I create a new job (or duplicate a failing one) add the git parameter to retrieve tag (or branch) and my build steps I can build right away. It shows me the full tag list and can build the one I select.

  • On the second run, when I click "build with parameter" again then no list provided for the tag and with the branch I have this error :

    Command "git ls-remote -h ssh://jenkins@192.168.1.200/repo/git/xxx.git" 
    returned status code 128:
    stdout: 
    stderr: /tmp/ssh3146539705442744984.sh: line 6: ssh: command not found
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    Please look at the Log
    

So it looks like access issue to the git repo but it's working on first run and I still can build same project (so doing a git checkout too) without this git parameter so I assume my git configuration / credentials are ok.

If you have any idea where to look ?

ps: Jenkins is running on the same machine as the repository (a linux)

Jenkins 2.73.2 Git plugin 3.6.2 Git Parameter Plug-In 0.8.1 Thanks, Nicolas.

Javier C.
  • 6,011
  • 4
  • 33
  • 46
  • The error says it can't find ssh. Did you make sure ssh is in the path. It seems unlikely that is truly the cause, but try running a simple ssh command in a shell and just make sure that ssh is found. I'd eliminate that possibility first. (Still doesn't explain why it works the first time). – Rob Hales Oct 25 '17 at 14:11
  • 1
    Did you ever figure this out? There is an open issue for this and Windows slaves: https://issues.jenkins-ci.org/browse/JENKINS-45480 – JoelWilson Feb 23 '18 at 17:20

0 Answers0