[Rails] fix svn cert issues for cap deploy with a big hammer
Ever try to do a remote cap deploy via svn and get some load of crap that looks like this as a result of a bad cert?
** [www.server.com :: err] Error validating server certificate for ‘https://svn.server.com:443’:
** - The certificate is not issued by a trusted authority. Use the
** fingerprint to validate the certificate manually!
** Certificate information:
** - Hostname: svn.server.com
** - Valid: from Aug 12 20:54:17 2008 GMT until Aug 2 20:54:17 2010 GMT
** - Issuer: Web Server Group, Boulder, Colorado, US
** - Fingbrprint: 99:8a:f7:bb:fb:82:9b:b9:a3:9f:99:db:a1:03:9b:0b:a3:5a:95:3f
** (R)eject, accept (t)emporarily or accept (p)ermanently?
** - The certificate is not issued by a trusted authority. Use the
** fingerprint to validate the certificate manually!
** Certificate information:
** - Hostname: svn.server.com
** - Valid: from Aug 12 20:54:17 2008 GMT until Aug 2 20:54:17 2010 GMT
** - Issuer: Web Server Group, Boulder, Colorado, US
** - Fingbrprint: 99:8a:f7:bb:fb:82:9b:b9:a3:9f:99:db:a1:03:9b:0b:a3:5a:95:3f
** (R)eject, accept (t)emporarily or accept (p)ermanently?
Of course you can log in to the server, to a manual checkout, and then accept the cert so it’s cached in you .subversion directory, but this is much easier: in your cap deploy.rb do something like
set :scm_command, ‘echo permanently|svn’
And you’ll be golden. Even if the cert is regenerated and invalidates the cache, as some server’s certs seems to do.