Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21329

Can't do git commands in Jenkins

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Blocker Blocker
    • batch-task-plugin
    • None
    • Jenkins Master service at Linux.
      Jenkins Slave services at windows.

      • Have Jenkins v1.532.1.
      • Jenkins master service is running on a Linux and the master of the job (where it fails) is a Windows that has a Jenkins slave service configured to log on with the same user account that works ok when running directly on the PC.
      • This occurs with "windows batch command" or using the source code management git (plugin v2.01).
      • I've inserted a ping to prove that it is not a DNS issue:

      "
      Started by user anonymous
      Building remotely on Windows_vs100_slave in workspace c:\h\workspace\GIT_test
      [GIT_test] $ cmd /c call C:\DOCUME~1\user\LOCALS~1\Temp\hudson354076269384288705.bat

      c:\h\workspace\GIT_test>ping host

      Pinging host [192.168.1.43] with 32 bytes of data:
      Reply from 192.168.1.43: bytes=32 time<1ms TTL=64
      Reply from 192.168.1.43: bytes=32 time<1ms TTL=64
      Reply from 192.168.1.43: bytes=32 time<1ms TTL=64
      Reply from 192.168.1.43: bytes=32 time<1ms TTL=64

      Ping statistics for 192.168.1.43:
      Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
      Approximate round trip times in milli-seconds:
      Minimum = 0ms, Maximum = 0ms, Average = 0ms

      c:\h\workspace\GIT_test>cd c:\h\workspace\GIT_test

      c:\h\workspace\GIT_test>REM make sure nothing is hidden

      c:\h\workspace\GIT_test>attrib -H /S
      File not found - C:\h\workspace\GIT_test*.*

      c:\h\workspace\GIT_test>REM recursively remove child folders

      c:\h\workspace\GIT_test>for / %X in (.) do rd /s /q "%X"

      c:\h\workspace\GIT_test>REM delete files in root folder

      c:\h\workspace\GIT_test>del /q /f *

      c:\h\workspace\GIT_test>REM get the source

      c:\h\workspace\GIT_test>git clone git@host:/opt/git/common/mde.git
      Cloning into 'mde'...
      fatal: Could not read from remote repository.

      Please make sure you have the correct access rights
      and the repository exists.

      c:\h\workspace\GIT_test>exit 128
      Build step 'Execute Windows batch command' marked build as failure
      Finished: FAILURE
      "

            kohsuke Kohsuke Kawaguchi
            pedroreis pedro reis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: