Simple "post-receive" hook returns exception

180 views
Skip to first unread message

Flavio Spezi

unread,
Feb 17, 2015, 12:27:26 PM2/17/15
to scmma...@googlegroups.com
I not understand because but this "post-receive" hook does not works:

#!/bin/sh
#
# An example hook script for the "post-receive" event.
#
# The "post-receive" script is run after receive-pack has accepted a pack
# and the repository has been updated.  It is passed arguments in through
# stdin in the form
#  <oldrev> <newrev> <refname>
# For example:
#  aa453216d1b3e49e7f6f98441fa56946ddcd6a20 68f7abf4e6f922807889f52bc043ecd31b79f814 refs/heads/master
#
# see contrib/hooks/ for a sample, or uncomment the next line and
# rename the file to "post-receive".


#. /usr/share/doc/git-core/contrib/hooks/post-receive-email
"C:/Program Files/Git/bin/git.exe" --work-tree=c:/InetWeb/Domains/MyWebSite.it/www_v1 --git-dir="c:/InetWeb/Repos/MyWebSite.it.v1" checkout -f

When I do a commit I read the posted log in console window.
I'm using SCM-Manager 1.45


2015-02-17 18:15:55.654 [qtp22579209-22] ERROR sonia.scm.web.GitFileHook - failure during file hook executionjava.io.IOException: Cannot run program "C:\InetWeb\Repos\MyWebSite.it.v1\hooks\post-receive" (in directory "C:\InetWeb\Repos\MyWebSite.it.v1"): CreateProcess error=193, %1 is not a valid Win32 application
        at java.lang.ProcessBuilder.start(Unknown Source) ~[na:1.8.0_31]
        at sonia.scm.web.GitFileHook.createProcess(GitFileHook.java:142) [scm-git-plugin-1.45.jar:na]
        at sonia.scm.web.GitFileHook.execute(GitFileHook.java:216) [scm-git-plugin-1.45.jar:na]
        at sonia.scm.web.GitFileHook.execute(GitFileHook.java:197) [scm-git-plugin-1.45.jar:na]
        at sonia.scm.web.GitFileHook.execute(GitFileHook.java:117) [scm-git-plugin-1.45.jar:na]
        at sonia.scm.web.GitReceiveHook.onReceive(GitReceiveHook.java:172) [scm-git-plugin-1.45.jar:na]
        at sonia.scm.web.GitReceiveHook.onPostReceive(GitReceiveHook.java:102) [scm-git-plugin-1.45.jar:na]
        at org.eclipse.jgit.transport.ReceivePack.service(ReceivePack.java:236)[org.eclipse.jgit-3.5.3.201412180710-r-scm1.jar:3.5.3.201412180710-r-scm1]
        at org.eclipse.jgit.transport.ReceivePack.receive(ReceivePack.java:160)[org.eclipse.jgit-3.5.3.201412180710-r-scm1.jar:3.5.3.201412180710-r-scm1]
        at org.eclipse.jgit.http.server.ReceivePackServlet.doPost(ReceivePackServlet.java:187) [org.eclipse.jgit.http.server-3.5.3.201412180710-r-scm1.jar:3.5.3.201412180710-r-scm1]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) [javax.servlet-2.5.0.v201103041518.jar:na]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [javax.servlet-2.5.0.v201103041518.jar:na]
        at org.eclipse.jgit.http.server.glue.UrlPipeline$Chain.doFilter(UrlPipeline.java:237) [org.eclipse.jgit.http.server-3.5.3.201412180710-r-scm1.jar:3.5.3.201412180710-r-scm1]
        at org.eclipse.jgit.http.server.ReceivePackServlet$Factory.doFilter(ReceivePackServlet.java:144) [org.eclipse.jgit.http.server-3.5.3.201412180710-r-scm1.jar:3.5.3.201412180710-r-scm1]
        at org.eclipse.jgit.http.server.glue.UrlPipeline$Chain.doFilter(UrlPipeline.java:235) [org.eclipse.jgit.http.server-3.5.3.201412180710-r-scm1.jar:3.5.3.201412180710-r-scm1]
        at org.eclipse.jgit.http.server.RepositoryFilter.doFilter(RepositoryFilter.java:151) [org.eclipse.jgit.http.server-3.5.3.201412180710-r-scm1.jar:3.5.3.201412180710-r-scm1]
        at org.eclipse.jgit.http.server.glue.UrlPipeline$Chain.doFilter(UrlPipeline.java:235) [org.eclipse.jgit.http.server-3.5.3.201412180710-r-scm1.jar:3.5.3.201412180710-r-scm1]
        at org.eclipse.jgit.http.server.NoCacheFilter.doFilter(NoCacheFilter.java:80) [org.eclipse.jgit.http.server-3.5.3.201412180710-r-scm1.jar:3.5.3.201412180710-r-scm1]
        at org.eclipse.jgit.http.server.glue.UrlPipeline$Chain.doFilter(UrlPipeline.java:235) [org.eclipse.jgit.http.server-3.5.3.201412180710-r-scm1.jar:3.5.3.201412180710-r-scm1]
        at org.eclipse.jgit.http.server.glue.UrlPipeline.service(UrlPipeline.java:215) [org.eclipse.jgit.http.server-3.5.3.201412180710-r-scm1.jar:3.5.3.201412180710-r-scm1]
        at org.eclipse.jgit.http.server.glue.SuffixPipeline.service(SuffixPipeline.java:101) [org.eclipse.jgit.http.server-3.5.3.201412180710-r-scm1.jar:3.5.3.201412180710-r-scm1]
        at org.eclipse.jgit.http.server.glue.MetaFilter.doFilter(MetaFilter.java:175) [org.eclipse.jgit.http.server-3.5.3.201412180710-r-scm1.jar:3.5.3.201412180710-r-scm1]
        at org.eclipse.jgit.http.server.glue.MetaServlet.service(MetaServlet.java:133) [org.eclipse.jgit.http.server-3.5.3.201412180710-r-scm1.jar:3.5.3.201412180710-r-scm1]
        at sonia.scm.web.ScmGitServlet.service(ScmGitServlet.java:133) [scm-git-plugin-1.45.jar:na]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) [javax.servlet-2.5.0.v201103041518.jar:na]
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at sonia.scm.web.filter.PermissionFilter.doFilter(PermissionFilter.java:171) [scm-core-1.45.jar:na]
        at sonia.scm.web.filter.HttpFilter.doFilter(HttpFilter.java:102) [scm-core-1.45.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at sonia.scm.web.filter.BasicAuthenticationFilter.processRequest(BasicAuthenticationFilter.java:423) [scm-core-1.45.jar:na]
        at sonia.scm.web.filter.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:214) [scm-core-1.45.jar:na]
        at sonia.scm.web.filter.HttpFilter.doFilter(HttpFilter.java:102) [scm-core-1.45.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at sonia.scm.filter.MDCFilter.doFilter(MDCFilter.java:96) [classes/:na]
        at sonia.scm.web.filter.HttpFilter.doFilter(HttpFilter.java:102) [scm-core-1.45.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at sonia.scm.web.filter.AutoLoginFilter.doFilter(AutoLoginFilter.java:85) [scm-core-1.45.jar:na]
        at sonia.scm.web.filter.HttpFilter.doFilter(HttpFilter.java:102) [scm-core-1.45.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at sonia.scm.filter.BaseUrlFilter.doFilter(BaseUrlFilter.java:117) [classes/:na]
        at sonia.scm.web.filter.HttpFilter.doFilter(HttpFilter.java:102) [scm-core-1.45.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449) [shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365) [shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90) [shiro-core-1.2.3.jar:1.2.3]
        at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83) [shiro-core-1.2.3.jar:1.2.3]
        at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383) [shiro-core-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362) [shiro-web-1.2.3.jar:1.2.3]
        at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125) [shiro-web-1.2.3.jar:1.2.3]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113)[guice-servlet-3.0.jar:na]
        at sonia.scm.boot.BootstrapFilter.doFilter(BootstrapFilter.java:119) [classes/:na]
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1288) [jetty-servlet-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:443) [jetty-servlet-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) [jetty-server-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:556) [jetty-security-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:227) [jetty-server-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1044) [jetty-server-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:372) [jetty-servlet-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:189) [jetty-server-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:978) [jetty-server-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) [jetty-server-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) [jetty-server-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) [jetty-server-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.server.Server.handle(Server.java:369) [jetty-server-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:486) [jetty-server-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:944) [jetty-server-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:1005) [jetty-server-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:865) [jetty-http-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240) [jetty-http-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:82) [jetty-server-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:667) [jetty-io-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:52) [jetty-io-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) [jetty-util-7.6.16.v20140903.jar:7.6.16.v20140903]
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) [jetty-util-7.6.16.v20140903.jar:7.6.16.v20140903]
        at java.lang.Thread.run(Unknown Source) [na:1.8.0_31]
Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
        at java.lang.ProcessImpl.create(Native Method) ~[na:1.8.0_31]
        at java.lang.ProcessImpl.<init>(Unknown Source) ~[na:1.8.0_31]
        at java.lang.ProcessImpl.start(Unknown Source) ~[na:1.8.0_31]
        ... 114 common frames omitted
2015-02-17 18:15:55.797 [EventBus-0] INFO  sonia.scm.repository.LastModifiedUpdateListener - update last modified date of repository 8EP4YsZey1
2015-02-17 18:15:55.799 [EventBus-0] INFO  sonia.scm.repository.DefaultRepositoryManager - modify repository MyWebSite.it.v1 of type git

Sebastian Sdorra

unread,
Feb 18, 2015, 2:50:56 AM2/18/15
to scmma...@googlegroups.com
It looks like you are trying to execute a unix shell script on windows. Do you use cygwin or something similar?

Sebastian

--
You received this message because you are subscribed to the Google Groups "scmmanager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scmmanager+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Flavio Spezi

unread,
Feb 18, 2015, 3:11:44 AM2/18/15
to scmma...@googlegroups.com

Flavio Spezi

unread,
Feb 19, 2015, 5:41:05 AM2/19/15
to scmma...@googlegroups.com
How can I check / analyze what happens when "hook" is running?
There is a simplest instruction like "print 'hello world' " or a method to verbose log? It can be useful to do some test.

Sebastian Sdorra

unread,
Feb 23, 2015, 2:13:48 AM2/23/15
to scmma...@googlegroups.com
No, there is no method to analyze the hook, except of the scm-manager logs. But the problem seems to be that your windows can not execute this type scripts. Sorry, but i have not much experience with hooks on windows.

Sebastian

Flavio Spezi

unread,
Feb 26, 2015, 2:18:37 PM2/26/15
to scmma...@googlegroups.com
I had try any experiment that I had think. Nothing.

I know that the script works fine with GIT-Extension... then there is a method to run it.
But I can also change the script, if it is necessary.
To find the cause of error, then to find the solution, I had try to empty file, to change the first line with "sh" instead of "bash". Nothing: I receive the same error.

Can you past me the Java block of code (and some details of variables content) that run the script, please?

Sebastian Sdorra

unread,
Feb 26, 2015, 2:34:19 PM2/26/15
to scmma...@googlegroups.com
The file hooks of scm-manager are handled in the following class:


Some details to the used variables:

- RepositoryHookType: is the type of the hook, pre receive or post receive
- ReceivePack: the git receive pack contains all informations of the push
- ReceiveCommand: a receive command, describes the git server command (create, update or delete branch)

If you have more questions, don't hesitate to ask.

Sebastian

Flavio Spezi

unread,
Feb 26, 2015, 5:11:43 PM2/26/15
to scmma...@googlegroups.com
Very interesting...
How can I enable verbose Log?

Flavio Spezi

unread,
Feb 27, 2015, 4:57:29 AM2/27/15
to scmma...@googlegroups.com
Ok Sebastian, I think that I found the issue then the solution.

Inside your class, the `createProcess` method run the hook script.
This is possible in POSIX OS, but Windows OS can't run a hook script because Windows want a file extension to understand how to run the file.

POSIX systems uses the first row of script to declare the interpreter of script: "#!/bin/bash" say that the "bash" will be used to run script.
Windows select how to run a file reading the file extension.

To add "hook" scripts in Windows, I read that I can install CYGWIN, but I do not love it (bad experiences in past).

Then I suggest you another way. You can add a little feature.
In SCM-Manager settings you can add an option to indicate the fullpath of "script interpreter" (like BASH) to use to run all script.
Then the `createProcess` become:

  private Process createProcess(File hook) throws IOException
  {
    StringBuilder sb = new StringBuilder();
    if (_SCRIPT_INTERPETER_FORCED_FULLPATH != null) {
        sb.append(_SCRIPT_INTERPRETER_FORCED_FULLPATH);
        sb.append(" ");
    }
    sb.append(hook.getAbsolutePath());

    ProcessBuilder pb = new ProcessBuilder(sb.toString());

    // use repostitory directory as working directory for file hooks
    // see issue #99
    pb.directory(rpack.getRepository().getDirectory());

    // copy system environment for hook
    pb.environment().putAll(System.getenv());

    // start process
    return pb.redirectErrorStream(true).start();
  }
...

Flavio Spezi

unread,
Feb 27, 2015, 5:02:18 AM2/27/15
to scmma...@googlegroups.com
Sebastian, to test the solution before implement all the feature, I can help you to test it.

Change `createProcess` with this, compile project, then pass it to me.

  private Process createProcess(File hook) throws IOException
  {
    ProcessBuilder pb = new ProcessBuilder("bash " + hook.getAbsolutePath());  // <<< the change

Flavio Spezi

unread,
Feb 27, 2015, 5:16:44 AM2/27/15
to scmma...@googlegroups.com

Sorry Sebastian.
I look now how works GIT-Extensions.
It allow user (in Options) to define the "bin" path where it can find BASH, SH, and so on.
Git-Extensions open the hook file, read the first line to get the script interpreter. Then run this.
The script interpreter is "/bin/bash" (example), then this path will be concatenated with the "bin path" in Options.

My solution is easy to implement. But this is more flexible.

GitExtensions-settings.gif

ghc...@gmail.com

unread,
Aug 8, 2016, 5:46:41 AM8/8/16
to scmmanager
You can use a batch file named post-receive.bat instead.

Calling bash from it should work.
Reply all
Reply to author
Forward
0 new messages