Question

I'm trying to make a post-commit script that will, when I push changes to the server, will update the "staging" (where the client does actually have access).

But the problem is that when the post-commit is called (I sudo su'ed to the svn user) and it gets:

[svn@beautifulserver.com: / ]# svn update /home/my-beautiful-home/www
Authentication realm: <http://svn.my-beautiful-url.com:80> BEAUTIFUL SVN
Password for 'svn': 

So the post-commit simply crashes with a:

Warning: post-commit hook failed (exit code 255) with no output.

Any idea on how to bypass this? Is there a way to specify username and password in the command line?

Thanks!

Was it helpful?

Solution

svn help update shows:

Global options:
  --username ARG           : specify a username ARG
  --password ARG           : specify a password ARG
  --no-auth-cache          : do not cache authentication tokens
  --non-interactive        : do no interactive prompting
  --trust-server-cert      : accept unknown SSL server certificates without
                             prompting (but only with '--non-interactive')
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top