Subversion hook does not accept certificate permanently

I hope someone can answer my question.

I have Subversion configured, served by Apache2 + SSL, doing web development.

I want the post commit to update svn on my testing server, so when someone commits a transaction, it automatically updates the testing site. The hook does not work because the certificate is self-generated and is not trusted.

I tried to accept (p), but it is not.

Any ideas?

+6
svn hook svn-hooks
source share
7 answers

root belonged to the .subversion folder in my HOME, so I deleted it and ran svn up again. Now all is well.

+8
source share

On Linux:

Here I fixed the problem by chmodding the files in $ HOME / .subversion / auth / svn.ssl.server to -rw-rr--. Apparently, if the server receives a new or updated certificate, it writes a new file, but does not add write permissions for itself. with -r - r - r - permissions, the svn program works, but it cannot write the β€œAccept forever” flag to a file .. :)

+5
source share

You did not say which platform your test server is running on, but if it is a Windows window, you need to add the certificate to the certificate store of the test server. The following articles may be helpful:

+1
source share

It is possible that subversion works as another user, and then the one you accepted the certificate when you invoke it. Try to figure out the user (for example, put "echo $ USER> / tmp / svn-hook-user" in the post-commit script hook) and use sudo to accept the certificate as that user.

Alternatively, check out the Subversion book on setting up your configuration to accept self-signed certificates: SSL Certificate Management .

+1
source share

Are you using sudo or something in the script? Sudo usually clears environment variables, so HOME does not exist. You must have a writable home directory in which subversion can store information about a certificate that is constantly accepted. So set the main HOME variable at the beginning of the script, and it should work.

0
source share

Was the same problem installed on Window Server with Apache. The message commit host will fail. I'm not sure SVN stands alone, but I use VisualSVN Server, which runs as a Windows service. The default user account for this service was Network Service - so I just changed the account to my own administrator account and everything worked.

0
source share

When your tesing site is on the same server, use the file: /// to check the repository, to avoid certificate verification.

svn co file:///path_to/your/repo 
0
source share

All Articles