views:

558

answers:

3

Hi there,

I need to create a script that backups a couple of files on a SVN repository during the night, since the files are secure I can commit them without entering a username (is that even possible?) or password.

Possible solutions I came up with: - creating a dummy user without password or with a known password but this poses a security problem (someone could read it and use it to commit whatever he likes) - creating a script that hides my password but passes it to the svn command.

Thankyou

A: 

If you have access to svn+ssh, you can use public-key authentication using a passphrase-less private key on script's side and its public counterpart on the svn server.

macbirdie
+6  A: 

If you use webdav access (http/https) then you can configure authentication on the server side (you can provide an AuthUserFile for apache to use). You also have the option of third-party authentication, e.g. via LDAP.

If you use svn over ssh, public keys are the way to go. The server uses the public key to authenticate the private key that only the authorised client machine has access to.

Neither of these will require passwords, but will still be secure.

ire_and_curses
I'll go with webdav, very useful solution, thankyou!
Lex
+1  A: 

SCMs (and SVN in particular) are not devised for backups. I'm sure you'll find many other more suitable products.

Milen A. Radev
You stand correct, but at the moment svn is the only viable solution. I am relying on the fact that the repo is backed up on high availability hardware on separate raid disks (that is the real backup)
Lex