{"action":"created","issue":{"url":"https://api.github.com/repos/Nerdwin15/stash-jenkins-postreceive-webhook/issues/134","labels_url":"https://api.github.com/repos/Nerdwin15/stash-jenkins-postreceive-webhook/issues/134/labels{/name}","comments_url":"https://api.github.com/repos/Nerdwin15/stash-jenkins-postreceive-webhook/issues/134/comments","events_url":"https://api.github.com/repos/Nerdwin15/stash-jenkins-postreceive-webhook/issues/134/events","html_url":"https://github.com/Nerdwin15/stash-jenkins-postreceive-webhook/issues/134","id":96510795,"number":134,"title":"commit notification null","user":{"login":"danalbu","id":6478689,"avatar_url":"https://avatars.githubusercontent.com/u/6478689?v=3","gravatar_id":"","url":"https://api.github.com/users/danalbu","html_url":"https://github.com/danalbu","followers_url":"https://api.github.com/users/danalbu/followers","following_url":"https://api.github.com/users/danalbu/following{/other_user}","gists_url":"https://api.github.com/users/danalbu/gists{/gist_id}","starred_url":"https://api.github.com/users/danalbu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danalbu/subscriptions","organizations_url":"https://api.github.com/users/danalbu/orgs","repos_url":"https://api.github.com/users/danalbu/repos","events_url":"https://api.github.com/users/danalbu/events{/privacy}","received_events_url":"https://api.github.com/users/danalbu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-07-22T08:45:02Z","updated_at":"2015-09-22T00:37:05Z","closed_at":null,"body":"I am getting this error if i manually trigger the plugin from stash without this options turned on:\r\nOmit SHA1 Hash Code\r\nOmit Branch Name\r\nSystem:\r\nJenkins 1609.1\r\nGit plugin 2.3.5\r\nStash Jenkins Webhook plugin 2.7.0\r\nStash Server version 3.6.0\r\n\r\nI am basically having 2 jobs identical, only the branches name is different:\r\none is \"master\" the other one \"release\"\r\n\r\nThe error from Jenkins console:\r\n\r\n commit notification null\r\n00:00:00.027 [EnvInject] - Loading node environment variables.\r\n00:00:00.037 Building remotely on ****** (automation 10xwindows) in workspace C:\\jenkins\\workspace\\StashJobTrigger_Branch\r\n00:00:00.090  > C:\\jenkins\\tools\\git\\bin\\git.exe rev-parse --is-inside-work-tree # timeout=10\r\n00:00:00.106 Fetching changes from the remote Git repository\r\n00:00:00.110  > C:\\jenkins\\tools\\git\\bin\\git.exe config remote.origin.url ssh://************.git # timeout=10\r\n00:00:00.130 Fetching upstream changes from ssh://*****************.git\r\n00:00:00.132  > C:\\jenkins\\tools\\git\\bin\\git.exe --version # timeout=10\r\n00:00:00.145  > C:\\jenkins\\tools\\git\\bin\\git.exe -c core.askpass=true fetch --tags --progress ssh://************.git +refs/heads/*:refs/remotes/origin/*\r\n00:00:04.745  > C:\\jenkins\\tools\\git\\bin\\git.exe rev-parse \"null^{commit}\" # timeout=10\r\n00:00:04.764 FATAL: Command \"C:\\jenkins\\tools\\git\\bin\\git.exe rev-parse \"null^{commit}\"\" returned status code 128:\r\n00:00:04.764 stdout: null^{commit}\r\n00:00:04.764 \r\n00:00:04.764 stderr: fatal: ambiguous argument 'null^{commit}': unknown revision or path not in the working tree.\r\n00:00:04.764 Use '--' to separate paths from revisions, like this:\r\n00:00:04.764 'git <command> [<revision>...] -- [<file>...]'\r\n00:00:04.764 \r\n00:00:04.764 hudson.plugins.git.GitException: Command \"C:\\jenkins\\tools\\git\\bin\\git.exe rev-parse \"null^{commit}\"\" returned status code 128:\r\n00:00:04.765 stdout: null^{commit}\r\n00:00:04.765 \r\n00:00:04.765 stderr: fatal: ambiguous argument 'null^{commit}': unknown revision or path not in the working tree.\r\n00:00:04.765 Use '--' to separate paths from revisions, like this:\r\n00:00:04.765 'git <command> [<revision>...] -- [<file>...]'\r\n00:00:04.765 \r\n00:00:04.765 \tat org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1591)\r\n00:00:04.765 \tat org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1567)\r\n00:00:04.765 \tat org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1563)\r\n00:00:04.765 \tat org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1249)\r\n00:00:04.765 \tat org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommand(CliGitAPIImpl.java:1261)\r\n00:00:04.765 \tat org.jenkinsci.plugins.gitclient.CliGitAPIImpl.revParse(CliGitAPIImpl.java:622)\r\n00:00:04.765 \tat hudson.plugins.git.GitAPI.revParse(GitAPI.java:316)\r\n00:00:04.765 \tat sun.reflect.GeneratedMethodAccessor80.invoke(Unknown Source)\r\n00:00:04.765 \tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\r\n00:00:04.765 \tat java.lang.reflect.Method.invoke(Method.java:601)\r\n00:00:04.765 \tat hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299)\r\n00:00:04.765 \tat hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:280)\r\n00:00:04.765 \tat hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:239)\r\n00:00:04.765 \tat hudson.remoting.UserRequest.perform(UserRequest.java:118)\r\n00:00:04.765 \tat hudson.remoting.UserRequest.perform(UserRequest.java:48)\r\n00:00:04.765 \tat hudson.remoting.Request$2.run(Request.java:328)\r\n00:00:04.765 \tat hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)\r\n00:00:04.765 \tat java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)\r\n00:00:04.765 \tat java.util.concurrent.FutureTask.run(FutureTask.java:166)\r\n00:00:04.765 \tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)\r\n00:00:04.765 \tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)\r\n00:00:04.765 \tat hudson.remoting.Engine$1$1.run(Engine.java:63)\r\n00:00:04.765 \tat java.lang.Thread.run(Thread.java:722)\r\n00:00:04.765 \tat ......remote call to oo10.x_node2(Native Method)\r\n00:00:04.766 \tat hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1360)\r\n00:00:04.766 \tat hudson.remoting.UserResponse.retrieve(UserRequest.java:221)\r\n00:00:04.766 \tat hudson.remoting.Channel.call(Channel.java:753)\r\n00:00:04.766 \tat hudson.remoting.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:179)\r\n00:00:04.766 \tat com.sun.proxy.$Proxy50.revParse(Unknown Source)\r\n00:00:04.766 \tat org.jenkinsci.plugins.gitclient.RemoteGitImpl.revParse(RemoteGitImpl.java:546)\r\n00:00:04.766 \tat hudson.plugins.git.RevisionParameterAction.toRevision(RevisionParameterAction.java:85)\r\n00:00:04.766 \tat hudson.plugins.git.GitSCM.determineRevisionToBuild(GitSCM.java:903)\r\n00:00:04.766 \tat hudson.plugins.git.GitSCM.checkout(GitSCM.java:1017)\r\n00:00:04.766 \tat hudson.scm.SCM.checkout(SCM.java:484)\r\n00:00:04.766 \tat hudson.model.AbstractProject.checkout(AbstractProject.java:1270)\r\n00:00:04.766 \tat hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:609)\r\n00:00:04.766 \tat jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)\r\n00:00:04.766 \tat hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:531)\r\n00:00:04.766 \tat hudson.model.Run.execute(Run.java:1741)\r\n00:00:04.766 \tat hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:537)\r\n00:00:04.766 \tat hudson.model.ResourceController.execute(ResourceController.java:98)\r\n00:00:04.766 \tat hudson.model.Executor.run(Executor.java:374)\r\n00:00:04.772 Finished: FAILURE"},"comment":{"url":"https://api.github.com/repos/Nerdwin15/stash-jenkins-postreceive-webhook/issues/comments/142147316","html_url":"https://github.com/Nerdwin15/stash-jenkins-postreceive-webhook/issues/134#issuecomment-142147316","issue_url":"https://api.github.com/repos/Nerdwin15/stash-jenkins-postreceive-webhook/issues/134","id":142147316,"user":{"login":"bmoyles","id":982180,"avatar_url":"https://avatars.githubusercontent.com/u/982180?v=3","gravatar_id":"","url":"https://api.github.com/users/bmoyles","html_url":"https://github.com/bmoyles","followers_url":"https://api.github.com/users/bmoyles/followers","following_url":"https://api.github.com/users/bmoyles/following{/other_user}","gists_url":"https://api.github.com/users/bmoyles/gists{/gist_id}","starred_url":"https://api.github.com/users/bmoyles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmoyles/subscriptions","organizations_url":"https://api.github.com/users/bmoyles/orgs","repos_url":"https://api.github.com/users/bmoyles/repos","events_url":"https://api.github.com/users/bmoyles/events{/privacy}","received_events_url":"https://api.github.com/users/bmoyles/received_events","type":"User","site_admin":false},"created_at":"2015-09-22T00:37:05Z","updated_at":"2015-09-22T00:37:05Z","body":"We ran into this as well. Jenkins received \r\n?url=ssh%3A%2F%2Fgit%40scm-server.hostname.net%2Fprojectname%2Freponame.git&sha1=null\r\n\r\nper the access logs on our instance. When omit SHA is not checked, and the build is triggered from the repository config, I would expect one of two things to happen: a bare notifyCommit with just the repo is sent, *or*, the SHA for the HEAD of the default branch for the repository would be sent. "}}