When using git-parameter-plugin sometimes when opening "Build with Parameters" branch fetching fails with following error:

      The default value has been returned
      An error occurred while download data
      Command "git ls-remote -h <valid-git-repo-url>" returned status code 128:
      stdout: 
      stderr: /tmp/ssh5427760289448293929.sh: 6: /tmp/ssh5427760289448293929.sh: ssh: 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
      Please check the configuration
      

       

      After investigation this happens because environment variables are fetched from lastBuild.

      See net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition getEnvironment

      To be more precise jobWrapper.getSomeBuildEnvironments() is at fault.

      This is not valid, because if lastBuild node has incompatible PATH value to jenkins master node, then ssh will not be found and commands will fail.

      In our case lastBuild node was a windows machine and jenkins master is a linux machine.

          [JENKINS-56558] Environment variables get polluted from nodes

          Aigars Eglajs created issue -
          Aigars Eglajs made changes -
          Description Original: When using git-parameter-plugin sometimes when opening "Build with Parameters" branch fetching fails with following error:
          {noformat}
          The default value has been returned
          An error occurred while download data
          Command "git ls-remote -h <valid-git-repo-url>" returned status code 128:
          stdout: 
          stderr: /tmp/ssh5427760289448293929.sh: 6: /tmp/ssh5427760289448293929.sh: ssh: 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
          Please check the configuration
          {noformat}
           

          After investigation this happens because environment variables are fetched from lastBuild. See {{net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition getEnvironment, }}specifically{{ jobWrapper.getSomeBuildEnvironments()}} is at fault.

          This is not valid, because if lastBuild node has incompatible PATH value to jenkins master node, then ssh will not be found and commands will fail.

          In our case lastBuild node was a windows machine and jenkins master is a linux machine.
          New: When using git-parameter-plugin sometimes when opening "Build with Parameters" branch fetching fails with following error:
          {noformat}
          The default value has been returned
          An error occurred while download data
          Command "git ls-remote -h <valid-git-repo-url>" returned status code 128:
          stdout: 
          stderr: /tmp/ssh5427760289448293929.sh: 6: /tmp/ssh5427760289448293929.sh: ssh: 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
          Please check the configuration
          {noformat}
           

          After investigation this happens because environment variables are fetched from lastBuild. See {{net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition getEnvironment}}

          To be more precise,{{ jobWrapper.getSomeBuildEnvironments()}} is at fault.

          This is not valid, because if lastBuild node has incompatible PATH value to jenkins master node, then ssh will not be found and commands will fail.

          In our case lastBuild node was a windows machine and jenkins master is a linux machine.
          Aigars Eglajs made changes -
          Description Original: When using git-parameter-plugin sometimes when opening "Build with Parameters" branch fetching fails with following error:
          {noformat}
          The default value has been returned
          An error occurred while download data
          Command "git ls-remote -h <valid-git-repo-url>" returned status code 128:
          stdout: 
          stderr: /tmp/ssh5427760289448293929.sh: 6: /tmp/ssh5427760289448293929.sh: ssh: 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
          Please check the configuration
          {noformat}
           

          After investigation this happens because environment variables are fetched from lastBuild. See {{net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition getEnvironment}}

          To be more precise,{{ jobWrapper.getSomeBuildEnvironments()}} is at fault.

          This is not valid, because if lastBuild node has incompatible PATH value to jenkins master node, then ssh will not be found and commands will fail.

          In our case lastBuild node was a windows machine and jenkins master is a linux machine.
          New: When using git-parameter-plugin sometimes when opening "Build with Parameters" branch fetching fails with following error:
          {noformat}
          The default value has been returned
          An error occurred while download data
          Command "git ls-remote -h <valid-git-repo-url>" returned status code 128:
          stdout: 
          stderr: /tmp/ssh5427760289448293929.sh: 6: /tmp/ssh5427760289448293929.sh: ssh: 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
          Please check the configuration
          {noformat}
           

          After investigation this happens because environment variables are fetched from lastBuild.

          See net.uaznia.lukanus.hudson.plugins.gitparameter.GitParameterDefinition getEnvironment

          To be more precise jobWrapper.getSomeBuildEnvironments() is at fault.

          This is not valid, because if lastBuild node has incompatible PATH value to jenkins master node, then ssh will not be found and commands will fail.

          In our case lastBuild node was a windows machine and jenkins master is a linux machine.
          René Korthaus made changes -
          Link New: This issue causes JENKINS-50711 [ JENKINS-50711 ]
          Boguslaw Klimas made changes -
          Status Original: Open [ 1 ] New: In Progress [ 3 ]
          Boguslaw Klimas made changes -
          Resolution New: Fixed [ 1 ]
          Status Original: In Progress [ 3 ] New: Resolved [ 5 ]
          Boguslaw Klimas made changes -
          Link New: This issue relates to JENKINS-51512 [ JENKINS-51512 ]
          Boguslaw Klimas made changes -
          Link New: This issue relates to JENKINS-50711 [ JENKINS-50711 ]
          Boguslaw Klimas made changes -
          Link New: This issue relates to JENKINS-52051 [ JENKINS-52051 ]

            klimas7 Boguslaw Klimas
            enoyhs Aigars Eglajs
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: