My company has it’s svn server on a windows box which makes things like 30x more of a pain. We use svnsync to synchronize a local repo with a repo one.
Adding a post-commit.bat to call svnsync failed because it would hang waiting for user input to accept the SSL Certificate.
Error validating server certificate for 'https://someserver.com:443':
- The certificate is not issued by a trusted authority.
Use the fingerprint to validate the certificate manually!
- Hostname: someserver.com
- Valid: from Tue, 09 Dec 2008 01:49:41 GMT until Sun, 09 Jan 2011 01:49:41 GMT
- Issuer: Equifax Secure Inc., US
- Fingerprint: b1:4e:2d:b8:7f:27:96:ba:21:ef:46:fc:12:43:b5:4c:83:3b:dd:b9
(R)eject, accept (t)emporarily or accept (p)ermanently? svnsync: PROPFIND request failed on '/somefolder'
svnsync: PROPFIND of '/somefolder': Server certificate verification failed: issuer is not trusted
When svnsync was being run from post-commit it was being run as some system user which hasn’t already accepted the certificate to have it in it’s certificate store. I began looking into how I would add it when I realized that I had a scheduled task for which I could specify the user to run as. So, the simple solution is… create a scheduled task which invokes svnsync.
Then add to your post-commit.bat
@echo Running from postcommit hook! >> C:\sync_serverupdatessvn.log 2>&1
call SCHTASKS /Run /TN >> C:\sync_serverupdatessvn.log 2>&1
Just replace <YOURTASKNAME> with the name you gave to your scheduled task you created. You’ll also probably want to update the logfile name and path.