You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Alexandre <al...@gmail.com> on 2006/06/04 23:38:16 UTC

Hook scripts not working (svn update on post-commit)

Hi all,

I've configured access to my repository (version 131)
to be made through Apache (version 2058),
with basic authentication set up.

On Win32, somehow ;-), if I get to a working copy
directory and ask to "svn update" it, it doesn't need
me authenticated to do so.

As I'm working on a website project, I have built a
hook script (post-commit) so I can "svn update"
the live site working copy after every commit to the
repository. So, that script looked like the following:

path subversion_bin_dir
cd live_site_dir
svn update

With Apache authentication set up, the 3rd line
won't do what it's asked for. Unfortunately, I only
came up with this after banging my head on the
ground several times.

So, I'm writing this mournful piece of text just to
warn somebody on the same track I was fooling.
You have to tell it a username and a password,
like this:

svn update --username guest --password guest

Sorry for opening a new topic just for that, but
if I had found somebody remembering me of this,
I wouldn't be so sick as to why the hell it doens't
work!

Hope this would help someone...
Alexandre Martini

Re: Hook scripts not working (svn update on post-commit)

Posted by Andy Levy <an...@gmail.com>.
On 6/4/06, Alexandre <al...@gmail.com> wrote:
> I've configured access to my repository (version 131)
> to be made through Apache (version 2058),
> with basic authentication set up.
>
> On Win32, somehow ;-), if I get to a working copy
> directory and ask to "svn update" it, it doesn't need
> me authenticated to do so.

Perhaps because your credentials are cached in your Windows account?
%APPDATA%\subversion\auth

> So, I'm writing this mournful piece of text just to
> warn somebody on the same track I was fooling.
> You have to tell it a username and a password,
> like this:
>
> svn update --username guest --password guest

Because the account that the script is running under doesn't have a
%APPDATA% and isn't interactive in the first place, so it couldn't
cache this.  Plus, what if you had different repositories being served
requiring different usernames?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org