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

svnsync sync fails from cron, but works using shell prompt or ssh

From: Philip Bondi <pjbondi_at_SystemDatabase.com>
Date: Thu, 24 Jan 2008 22:55:27 -0500 (Eastern Standard Time)

Hello to all:

This script runs fine from ssh or shell prompt:

     #!/bin/bash -xvl
     # ****************************************************************************
     #
     # $Id: placeshift.bash 31395 2008-01-25 03:31:26Z pjbondi $
     # $URL: svn://pjbondi@fortyork.homelinux.com/svn-sdi/sdi/trunk/sysadmin/pjbondi/banff/placeshift.bash $
     # $Date: 2008-01-24 22:31:26 -0500 (Thu, 24 Jan 2008) $
     #
     # Description: update subversion working copies
     #
     # ****************************************************************************

     COMMENT='Automatically checked-in by command shell function svnu, see: $Id: placeshift.bash 31395 2008-01-25 03:31:26Z pjbondi $ $URL: svn://pjbondi@fortyork.homelinux.com/svn-sdi/sdi/trunk/sysadmin/pjbondi/banff/placeshift.bash $'
     + COMMENT='Automatically checked-in by command shell function svnu, see: $Id: placeshift.bash 31395 2008-01-25 03:31:26Z pjbondi $ $URL: svn://pjbondi@fortyork.homelinux.com/svn-sdi/sdi/trunk/sysadmin/pjbondi/banff/placeshift.bash $'
     pushd .
     + pushd .
     ~ ~
     #
     #
     eval `ssh-agent`
     ssh-agent
     ++ ssh-agent
     + eval 'SSH_AUTH_SOCK=/tmp/ssh-AdS16699/agent.16699;' export
     'SSH_AUTH_SOCK;' 'SSH_AGENT_PID=16700;' export 'SSH_AGENT_PID;' echo Agent
     pid '16700;'
     SSH_AUTH_SOCK=/tmp/ssh-AdS16699/agent.16699; export SSH_AUTH_SOCK;
     SSH_AGENT_PID=16700; export SSH_AGENT_PID; echo Agent pid 16700;
     ++ SSH_AUTH_SOCK=/tmp/ssh-AdS16699/agent.16699
     ++ export SSH_AUTH_SOCK
     ++ SSH_AGENT_PID=16700
     ++ export SSH_AGENT_PID
     ++ echo Agent pid 16700
     Agent pid 16700
     ssh-add
     /export/home/pjbondi/private-keys/philb-pjbondi-2048-passphrase-less.openssh
     + ssh-add
     /export/home/pjbondi/private-keys/philb-pjbondi-2048-passphrase-less.openssh
     Identity added:
     /export/home/pjbondi/private-keys/philb-pjbondi-2048-passphrase-less.openssh
     (/export/home/pjbondi/private-keys/philb-pjbondi-2048-passphrase-less.openssh)
     #
     #
     #
     id
     + id
     uid=500(pjbondi) gid=100(users)
     /opt/csw/bin/svnsync --non-interactive sync --username pjbondi
     file:///export/home/pjbondi/svn-sdi-backup
     + /opt/csw/bin/svnsync --non-interactive sync --username pjbondi
     file:///export/home/pjbondi/svn-sdi-backup
     Committed revision 31366.
     Copied properties for revision 31366.

But it fails from a cron job.

     eval `ssh-agent`
     ssh-agent
     ++ ssh-agent
     + eval 'SSH_AUTH_SOCK=/tmp/ssh-HnJ16667/agent.16667;' export
     'SSH_AUTH_SOCK;' 'SSH_AGENT_PID=16668;' export 'SSH_AGENT_PID;' echo Agent
     pid '16668;'
     SSH_AUTH_SOCK=/tmp/ssh-HnJ16667/agent.16667; export SSH_AUTH_SOCK;
     SSH_AGENT_PID=16668; export SSH_AGENT_PID; echo Agent pid 16668;
     ++ SSH_AUTH_SOCK=/tmp/ssh-HnJ16667/agent.16667
     ++ export SSH_AUTH_SOCK
     ++ SSH_AGENT_PID=16668
     ++ export SSH_AGENT_PID
     ++ echo Agent pid 16668
     Agent pid 16668
     ssh-add
     /export/home/pjbondi/private-keys/philb-pjbondi-2048-passphrase-less.openssh
     + ssh-add
     /export/home/pjbondi/private-keys/philb-pjbondi-2048-passphrase-less.openssh
     Identity added:
     /export/home/pjbondi/private-keys/philb-pjbondi-2048-passphrase-less.openssh
     (/export/home/pjbondi/private-keys/philb-pjbondi-2048-passphrase-less.openssh)
     #
     #
     #
     id
     + id
     uid=500(pjbondi) gid=100(users)
     /opt/csw/bin/svnsync --non-interactive sync --username pjbondi
     file:///export/home/pjbondi/svn-sdi-backup
     + /opt/csw/bin/svnsync --non-interactive sync --username pjbondi
     file:///export/home/pjbondi/svn-sdi-backup
     svnsync: 'pre-revprop-change' hook failed with error output:

     #

Any insights?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-01-25 04:56:37 CET

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.