Fix permanent “Error validating server certificate” problem with subversion

By neokrates, written on April 19, 2010


  • Join date: 11-30-99
  • Posts: 224
View Counter:
Rate it
  • Which tool is used for SCM/VCS in your enterprise?

    View Results

    Loading ... Loading ...
  • bodytext bodytext bodytext

Each time you try some SVN command, you get “Error validating server certificate” problem with subversion. Then you type your credentials and get to choose if you want to add your certificate permanently. You say “yes”, but next time get the same silly question.

Why does that happen? The problem may be, that the subversion configuration directory, which is normally under your ~/.subversion has WRONG permissions, so that each time you want to permanently add the credentials, svn actually cannot do so, and also doesn’t inform you that it can’t.
That situation can occur if subversion command is triggered by some process. In that case you need to find out, what user and group is this process running under.


✔ SVN 1.5.1

✔ UBUNTU 9.10

Should also work for:

✔ most subversion versions

✔ most Linux distros

✔ likely will also work under other OS’s
💡 REMARK If you have your problems for the different reason, this howto probably won’t help you.


Determine user and group

Under which user and group is your svn command being executed?

In my case it is under the bash script which is being started by tomcat webserver. So, I have user=tomcat, group=tomcat.

Say, you determined that user under which svn is running is: ${SVN_USER}:${SVN_GROUP}


In case you can login as ${SVN_USER}

Login as ${SVN_USER}.

Try your svn command. (In my case it was):

svn info 

You will get the usual:

(R)eject, accept (t)emporarily or accept (p)ermanently? p 

Answer ‘p’

Now, if all was ok, subversion should not ask you again. Also, any svn execution under ${SVN_USER} should work automatically.


In case you can’t login as ${SVN_USER}

You will need sudo permissions to do this one.

Create directory to store svn configuration, which is NOT in the default per-user home:

mkdir -p /opt/svnhome/home/subversion-conf 

Now, apply the command:

svn info --config-dir /opt/svnhome/home/subversion-conf 

IMPORTANT After you choose "p", the directory structure must have been created by subversion under /opt/svnhome/home/subversion-conf
Subversion has stored your reponce and data and will not ask you again. Just don’t forget to point your further svn commands to the right configuration: –config-dir /opt/svnhome/home/subversion-conf.

Now, ensure that ${SVN_USER} owns the snv configuratoin directory:

chown ${SVN_USER}:${SVN_GROUP} -R /opt/svnhome/home/subversion-conf 

Now, test the command again, this time by starting process running under ${SVN_USER}.

svn info --config-dir /opt/svnhome/home/subversion-conf 

Should work now. ;-)

Be Sociable, Share!
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: +4 (from 8 votes)
6 votes 'YES'  2 votes 'NO'


Be Sociable, Share!


2 Responses to “Fix permanent “Error validating server certificate” problem with subversion”

  1. ron says:

    Magic! Just spent 4 hours trying to find the missing piece of this puzzle, until I found it here at last. At least I can try and get some sleep with one problem less on the shelf…
    Thanks a million!

  2. Nickolay says:

    You saved my day :) I would say annoying weeks.
    ~/.subversion/auth/svn.ssl.server – this folder needs to be writeable/browseable (an all parent folders) for the process you are looking for.
    my case was IDE Eclipse.

Leave a Reply