[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svnsync in post commit script

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 29 Aug 2012 11:08:41 +0200

On Wed, Aug 29, 2012 at 10:06:57AM +0530, dhanushka ranasinghe wrote:
> Hi..
>
> im trying to setup svn replication using svnsync,
>
> when i ran flowing the svnsync command [1] in master server's terminal its
> syncing fine , but when i put same svnsync command in post-commit script
> it gives the following error [2]
>
> [1] /usr/bin/svnsync --source-username=svnsync --sync-username=svnsync
> sync https://svnslave.example.com/repos/proxy-sync --sync-password=abc
> --source-password=abc
>
> [2]
>
> svnsync: E070014: Unable to connect to a repository at URL '
> https://svnslave.example.com/repos/proxy-sync'
> svnsync: E070014: Can't read stdin: End of file found
>
>
> Is there any way to fix that issue
>
> Thank you

Try passing the --non-interactive option to svnsync and see if you
get a different error. That might provide more information.

Which user ID does the post-commit hook run as?
If it is something like 'apache' or 'www-data' when the post-commit
hook runs, but something else when you run the script manually,
that might explain the difference. Try running the post-commit script
manually as the same user that the server process runs as.

I see you're using HTTPS. My guess is that svnsync is trying to ask
whether the SLL certificate can be trusted. The certificate might not
yet be cached in the ~/.subversion directory of the server's user id.

Also, you may add --trust-server-cert if the connection between master
and slave is reasonably secure (i.e. doesn't cross the internet or untrusted
routers). Note that this option can compromise security, so be careful.
It is much safer to accept the certificate permantly just once.
Received on 2012-08-29 11:09:23 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.