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

CliGitAPIImplTest fails when .gitconfig sets push.default = nothing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • git-client-plugin
    • None

      Steps to reproduce:
      When push.default is set to nothing like so in .gitconfig:

      [push]  
              default = nothing
      

      Run the test_push_tags test:

      mvn -Dtest=CliGitAPIImplTest#test_push_tags test
      

      Result:

      Running org.jenkinsci.plugins.gitclient.CliGitAPIImplTest
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.762 sec <<< FAILURE! - in org.jenkinsci.plugins.gitclient.CliGitAPIImplTest
      test_push_tags(org.jenkinsci.plugins.gitclient.CliGitAPIImplTest)  Time elapsed: 2.725 sec  <<< ERROR!
      hudson.plugins.git.GitException: Command "git -c core.askpass=true push /tmp/hudson751564288875417152test" returned status code 128:
      stdout:
      stderr: fatal: You didn't specify any refspecs to push, and push.default is "nothing".
      
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1493)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1281)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:86)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$7.execute(CliGitAPIImpl.java:1560)
              at org.jenkinsci.plugins.gitclient.GitAPITestCase.test_push_tags(GitAPITestCase.java:937)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:606)
              at org.jenkinsci.plugins.gitclient.CliGitAPIImplTest.runTest(CliGitAPIImplTest.java:30)
      

            ndeloof Nicolas De Loof
            deepchip Martin d'Anjou
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: