Post-commit hook run as user in svn

Apache on a Windows machine running as SYSTEM.
What user and password should I use for post-commit.bat?

I am trying to copy the content to a directory for testing the developer version on a web server and it doesn't seem to work.

+2


source to share


1 answer


The hook scripts will be run by the server, so you only need to make sure the appropriate user (SYSTEM for you) has

  • read / write access to repositories (this should already be)
  • read / execute hook script access

Depending on what your script is doing, you may need more, for example if it creates a log - if it is accessing other resources altogether. This is probably the problem you are facing.

Also, if the hook script is .bat, an environment variable is required COMSPEC

to find the shell (I had this problem on Windows XP, mostly due to poor configuration). This variable is usually defined as C:\Windows\system32\cmd.exe

. PATH

is also very important.

Please note that this can be confusing, when you check the script with a different username you may have different access to your server id.




Change: . You can install or deploy critical environmental variables, such as PATH

, and COMSPEC

at the beginning of the package script, if you are not sure that they contain a server. For example,

SET ComSpec=%SystemRoot%\system32\cmd.exe
SET PATH=%PATH%;C:\Tools\SVN\svn-win32-1.4.6\bin

      

Sometimes it's easier than being in the dark and trying to change the server account.

+2


source







All Articles