0

I am using post commit hook in visual svn. I am trying to checkout the files committed to the repository:

When I commit the file, I get the below error in post commit hook:

D:\Program Files\VisualSVN Server>"D:\Program Files\VisualSVN Server\bin\svn.exe" checkout https://***.**.**/svn/Mobile/Node/trunk C:\MyProject 
Error validating server certificate for 'https://***.***.**:443':
 - The certificate is not issued by a trusted authority. Use the
   fingerprint to validate the certificate manually!
Certificate information:
 - Hostname: ALPHADEV.phipaper.dom
 - Valid: from Tue, 23 Feb 2010 21:36:08 GMT until Fri, 21 Feb 2020 21:36:08 GMT
 - Issuer: ALPHADEV.phipaper.dom
 - Fingerprint: 8a:33:33:56:00:56:44:4f:6d:d3:80:c5:ba:79:1a:cd:7a:f3:27:84
(R)eject, accept (t)emporarily or accept (p)ermanently?

How to fix this issue

bahrep
  • 29,961
  • 12
  • 103
  • 150
Sweety Bertilla
  • 972
  • 10
  • 35

1 Answers1

2

Use --trust-server-cert --non-interactive additional options for checkout

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • I added the above but I got the error as "authorization failed: Could not authenticate to server: rejected Basic challenge" – Sweety Bertilla Feb 18 '14 at 14:18
  • 1. You must checkout only once, later commits will `svn up` *existing repo* 2. If for VisualSVN Server user in your system you haven't stored credentials and server require authentication, you can't use anonymous operation – Lazy Badger Feb 18 '14 at 14:24
  • I tried to give username and password for the svn in the checkout but I got the below errorsvn: Can't set file 'C:\MyPath\.svn\entries' read-write: Access is denied. – Sweety Bertilla Feb 18 '14 at 14:26
  • @SweetyBertilla - you have wrong owner or permissions for Working Copy - Apache (behind VisualSVN Server) can write to it. **This** question is SU-topic, not SO – Lazy Badger Feb 18 '14 at 14:31
  • @SweetyBertilla - kill old WC, fix code of hook (one commit with `svn co`, next - `svn up`), start from scratch: this way you'll get correct security settings – Lazy Badger Feb 18 '14 at 14:34
  • Do you know how I can give permissions for the working copy path.? – Sweety Bertilla Feb 18 '14 at 14:35
  • @SweetyBertilla - just try to create it under the same user, which later will modify it – Lazy Badger Feb 18 '14 at 14:44
  • But my svn username and pwd is different from the local path usernmae and pwd – Sweety Bertilla Feb 18 '14 at 14:49
  • I created a new folder and executed the same command and it worked.. One more thing : Can I add filter to checkout when a specific path in the svn repository in committed – Sweety Bertilla Feb 18 '14 at 14:58
  • @SweetyBertilla - yes, grep output of `svnlook dirs-changed ...` in hook – Lazy Badger Feb 18 '14 at 16:46
  • I mean i wanted to specifically give a path, post commit should check whether that path is committed and check out that path. Example, /Mobile/Node/path. How to set this as the post commit hook path – Sweety Bertilla Feb 18 '14 at 16:48