Thursday, June 06, 2013

svn from cron - svn: Can't read stdin: End of file found

Another "it works from command line but not from cron":
ATTENTION!  Your password for authentication realm:   Subversion repository can only be stored to disk unencrypted!  You are advised to configure your system so that Subversion can store passwords encrypted, if possible.  See the documentation for details. You can avoid future appearances of this warning by setting the value of the 'store-plaintext-passwords' option to either 'yes' or 'no' in '/root/.subversion/servers'. ----------------------------------------------------------------------- Store password unencrypted (yes/no)? svn: Can't read stdin: End of file found
The thing to remember: Commands running from cron will run in a different environment so do not assume your local variables like $HOME, $PATH will be available. In this particular case subversion will store if accepted the password in ~/.subversion directory only after entering "yes". You need instead complete unattended run, so you need to use flag --no-auth-cache like in:
svn co http://subversion.sample.com/my/repo  --username 'myUser' --password 'myPass' --no-auth-cache

No comments:

Followers