hudson.plugins.git.GitException: Command "git config --get remote.origin.url" returned status code 1: stdout: stderr:

Jenkins JIRA | Nathan Nutter | 3 years ago
  1. 0

    [JENKINS-21110] Git Publisher fails because remote.origin.url is not set - Jenkins JIRA

    jenkins-ci.org | 1 year ago
    hudson.plugins.git.GitException: Command "git config --get remote.origin.url" returned status code 1: stdout: stderr:
  2. 0

    I saw a [comment|https://issues.jenkins-ci.org/browse/JENKINS-8903?focusedCommentId=188568&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-188568] that may be the basis of the problem: {quote} git-plugin 2.0 don't use remote.<foo>.url anymore {quote} The error is very similar to JENKINS-20258 but this is occurring in the Git Publisher Post-build Actions: {noformat} 07:23:10 Started by an SCM change 07:23:10 Building on master in workspace XXX 07:23:10 Fetching changes from the remote Git repository 07:23:10 Fetching upstream changes from ssh://XXX.git 07:23:20 Checking out Revision XXX (origin/perl-tests) 07:23:23 Cleaning workspace 07:23:23 Resetting working tree 07:23:24 Triggering XXX 07:59:13 XXX completed with result SUCCESS 07:59:13 Pushing HEAD to branch XXX at repo origin 07:59:14 ERROR: Failed to push branch XXX to origin 07:59:14 hudson.plugins.git.GitException: Command "git config --get remote.origin.url" returned status code 1: 07:59:14 stdout: 07:59:14 stderr: 07:59:14 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1099) 07:59:14 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1076) 07:59:14 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:917) 07:59:14 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:927) 07:59:14 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteUrl(CliGitAPIImpl.java:656) 07:59:14 at hudson.plugins.git.GitAPI.getRemoteUrl(GitAPI.java:61) 07:59:14 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:1129) 07:59:14 at hudson.plugins.git.GitAPI.push(GitAPI.java:65) 07:59:14 at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:303) 07:59:14 at hudson.plugins.git.GitPublisher$1.endBuild(GitPublisher.java:138) 07:59:14 at hudson.matrix.MatrixBuild$MatrixBuildExecution.post2(MatrixBuild.java:403) 07:59:14 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706) 07:59:14 at hudson.model.Run.execute(Run.java:1703) 07:59:14 at hudson.matrix.MatrixBuild.run(MatrixBuild.java:304) 07:59:14 at hudson.model.ResourceController.execute(ResourceController.java:88) 07:59:14 at hudson.model.Executor.run(Executor.java:231) 07:59:14 at hudson.model.OneOffExecutor.run(OneOffExecutor.java:43) 07:59:14 Notifying upstream projects of job completion 07:59:14 Finished: SUCCESS {noformat}

    Jenkins JIRA | 3 years ago | Nathan Nutter
    hudson.plugins.git.GitException: Command "git config --get remote.origin.url" returned status code 1: stdout: stderr:
  3. 0

    I saw a [comment|https://issues.jenkins-ci.org/browse/JENKINS-8903?focusedCommentId=188568&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-188568] that may be the basis of the problem: {quote} git-plugin 2.0 don't use remote.<foo>.url anymore {quote} The error is very similar to JENKINS-20258 but this is occurring in the Git Publisher Post-build Actions: {noformat} 07:23:10 Started by an SCM change 07:23:10 Building on master in workspace XXX 07:23:10 Fetching changes from the remote Git repository 07:23:10 Fetching upstream changes from ssh://XXX.git 07:23:20 Checking out Revision XXX (origin/perl-tests) 07:23:23 Cleaning workspace 07:23:23 Resetting working tree 07:23:24 Triggering XXX 07:59:13 XXX completed with result SUCCESS 07:59:13 Pushing HEAD to branch XXX at repo origin 07:59:14 ERROR: Failed to push branch XXX to origin 07:59:14 hudson.plugins.git.GitException: Command "git config --get remote.origin.url" returned status code 1: 07:59:14 stdout: 07:59:14 stderr: 07:59:14 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1099) 07:59:14 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1076) 07:59:14 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:917) 07:59:14 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:927) 07:59:14 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteUrl(CliGitAPIImpl.java:656) 07:59:14 at hudson.plugins.git.GitAPI.getRemoteUrl(GitAPI.java:61) 07:59:14 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:1129) 07:59:14 at hudson.plugins.git.GitAPI.push(GitAPI.java:65) 07:59:14 at hudson.plugins.git.GitPublisher.perform(GitPublisher.java:303) 07:59:14 at hudson.plugins.git.GitPublisher$1.endBuild(GitPublisher.java:138) 07:59:14 at hudson.matrix.MatrixBuild$MatrixBuildExecution.post2(MatrixBuild.java:403) 07:59:14 at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706) 07:59:14 at hudson.model.Run.execute(Run.java:1703) 07:59:14 at hudson.matrix.MatrixBuild.run(MatrixBuild.java:304) 07:59:14 at hudson.model.ResourceController.execute(ResourceController.java:88) 07:59:14 at hudson.model.Executor.run(Executor.java:231) 07:59:14 at hudson.model.OneOffExecutor.run(OneOffExecutor.java:43) 07:59:14 Notifying upstream projects of job completion 07:59:14 Finished: SUCCESS {noformat}

    Jenkins JIRA | 3 years ago | Nathan Nutter
    hudson.plugins.git.GitException: Command "git config --get remote.origin.url" returned status code 1: stdout: stderr:
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    I've cleaned the workspace and then this happened: 00:00:00.000 Started by user anonymous 00:00:00.002 Building remotely on build01-win7 in workspace V:\Jenkins\workspace\zetbox.Workflow-develop-update-nuget 00:00:00.027 Pruning obsolete local branches 00:00:00.069 FATAL: Command "config --get remote.origin.url" returned status code 1: 00:00:00.069 stdout: 00:00:00.069 stderr: 00:00:00.070 hudson.plugins.git.GitException: Command "config --get remote.origin.url" returned status code 1: 00:00:00.070 stdout: 00:00:00.070 stderr: 00:00:00.070 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:981) 00:00:00.070 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:961) 00:00:00.070 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:957) 00:00:00.070 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:877) 00:00:00.070 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:887) 00:00:00.070 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteUrl(CliGitAPIImpl.java:615) 00:00:00.070 at hudson.plugins.git.GitAPI.getRemoteUrl(GitAPI.java:61) 00:00:00.070 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.prune(CliGitAPIImpl.java:405) 00:00:00.070 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 00:00:00.070 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 00:00:00.070 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 00:00:00.070 at java.lang.reflect.Method.invoke(Unknown Source) 00:00:00.070 at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275) 00:00:00.070 at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256) 00:00:00.070 at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215) 00:00:00.070 at hudson.remoting.UserRequest.perform(UserRequest.java:118) 00:00:00.070 at hudson.remoting.UserRequest.perform(UserRequest.java:48) 00:00:00.070 at hudson.remoting.Request$2.run(Request.java:326) 00:00:00.070 at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 00:00:00.070 at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) 00:00:00.070 at java.util.concurrent.FutureTask.run(Unknown Source) 00:00:00.070 at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 00:00:00.070 at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 00:00:00.070 at hudson.remoting.Engine$1$1.run(Engine.java:60) 00:00:00.070 at java.lang.Thread.run(Unknown Source) The workspace stays empty. Here's the scm config: <scm class="hudson.plugins.git.GitSCM"> <configVersion>2</configVersion> <userRemoteConfigs> <hudson.plugins.git.UserRemoteConfig> <name>origin</name> <refspec>+refs/heads/*:refs/remotes/origin/*</refspec> <url>ssh://user@example.com/path/zetbox.Workflow.git</url> </hudson.plugins.git.UserRemoteConfig> </userRemoteConfigs> <branches> <hudson.plugins.git.BranchSpec> <name>develop</name> </hudson.plugins.git.BranchSpec> </branches> <excludedUsers/> <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/> <disableSubmodules>false</disableSubmodules> <recursiveSubmodules>false</recursiveSubmodules> <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations> <authorOrCommitter>false</authorOrCommitter> <clean>true</clean> <wipeOutWorkspace>false</wipeOutWorkspace> <pruneBranches>true</pruneBranches> <remotePoll>false</remotePoll> <gitTool>Default</gitTool> <submoduleCfg class="list"/> <relativeTargetDir/> <reference/> <gitConfigName/> <gitConfigEmail/> <skipTag>false</skipTag> <scmName/> </scm>

    Jenkins JIRA | 3 years ago | David Schmitt
    hudson.plugins.git.GitException: Command "config --get remote.origin.url" returned status code 1: stdout: stderr:
  6. 0

    I just upgraded to git plugin and Jenkins. I wiped out my workspace and then tried to run a build and got the messages below. I tried turning on the option to wipe out the workspace and force a clone and that didn't help either. 15:56:31 Started by user Jon Schewe 15:56:31 Building in workspace /home/hudson/.hudson/jobs/fll-release/workspace 15:56:31 Pruning obsolete local branches 15:56:31 FATAL: Command "config --get remote.origin.url" returned status code 1: 15:56:31 stdout: 15:56:31 stderr: 15:56:31 hudson.plugins.git.GitException: Command "config --get remote.origin.url" returned status code 1: 15:56:31 stdout: 15:56:31 stderr: 15:56:31 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:940) 15:56:31 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:921) 15:56:31 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:865) 15:56:31 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:875) 15:56:31 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteUrl(CliGitAPIImpl.java:603) 15:56:31 at hudson.plugins.git.GitAPI.getRemoteUrl(GitAPI.java:61) 15:56:31 at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.prune(CliGitAPIImpl.java:393) 15:56:31 at hudson.plugins.git.extensions.impl.PruneStaleBranch.beforeCheckout(PruneStaleBranch.java:31) 15:56:31 at hudson.plugins.git.GitSCM.checkout(GitSCM.java:858) 15:56:31 at hudson.model.AbstractProject.checkout(AbstractProject.java:1376) 15:56:31 at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:655) 15:56:31 at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:88) 15:56:31 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:560) 15:56:31 at hudson.model.Run.execute(Run.java:1592) 15:56:31 at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) 15:56:31 at hudson.model.ResourceController.execute(ResourceController.java:88) 15:56:31 at hudson.model.Executor.run(Executor.java:237) Eventually I got my job to build, here is what I did. 1) Delete configured repository 2) Delete configured branches 3) Select "None" as SCM 4) Save 5) Configure git repository Perhaps some data isn't getting properly migrated? I was running Jenkins 1.509.1 and git plugin 1.4.0 with git client plugin 1.4.5.

    Jenkins JIRA | 3 years ago | jpschewe
    hudson.plugins.git.GitException: Command "config --get remote.origin.url" returned status code 1: stdout: stderr:

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. hudson.plugins.git.GitException

      Command "git config --get remote.origin.url" returned status code 1: stdout: stderr:

      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn()
    2. org.jenkinsci.plugins
      CliGitAPIImpl.getRemoteUrl
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1099)
      2. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1076)
      3. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:917)
      4. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:927)
      5. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.getRemoteUrl(CliGitAPIImpl.java:656)
      5 frames
    3. Hudson GIT plugin
      GitAPI.getRemoteUrl
      1. hudson.plugins.git.GitAPI.getRemoteUrl(GitAPI.java:61)
      1 frame
    4. org.jenkinsci.plugins
      CliGitAPIImpl.push
      1. org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:1129)
      1 frame
    5. Hudson GIT plugin
      GitPublisher$1.endBuild
      1. hudson.plugins.git.GitAPI.push(GitAPI.java:65)
      2. hudson.plugins.git.GitPublisher.perform(GitPublisher.java:303)
      3. hudson.plugins.git.GitPublisher$1.endBuild(GitPublisher.java:138)
      3 frames
    6. Hudson
      OneOffExecutor.run
      1. hudson.matrix.MatrixBuild$MatrixBuildExecution.post2(MatrixBuild.java:403)
      2. hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:706)
      3. hudson.model.Run.execute(Run.java:1703)
      4. hudson.matrix.MatrixBuild.run(MatrixBuild.java:304)
      5. hudson.model.ResourceController.execute(ResourceController.java:88)
      6. hudson.model.Executor.run(Executor.java:231)
      7. hudson.model.OneOffExecutor.run(OneOffExecutor.java:43)
      7 frames