Fix permanent “Error validating server certificate” problem with subversion

By neokrates, written on April 19, 2010

howto

View Counter:
  • 142 views
Rate it
  • 1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
    Loading ... Loading ...
Ad
Poll
  • What are the 3 most important SCM/VCS features for you?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext
Most popular search terms:

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.

Software:

[v] SVN 1.5.1
[v] UBUNTU 9.10

Should also work for:

[v] most subversion versions
[v] most Linux distros
[v] likely will also work under other OS’s
  [i] REMARK If you have your problems for the different reason, this howto probably won’t help you.

1

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}

2.1

In case you can login as ${SVN_USER}

Login as ${SVN_USER}.

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

svn info https://my.svn.host/svn/my-path

 
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.

2.2

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 https://my.svn.host/svn/my-path


[!] 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 https://my.svn.host/svn/my-path



Should work now. ;-)

 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: +4 (from 6 votes)
5 votes 'YES'  1 votes 'NO'


TAGS

RELATED
Pages
Posts

SOCIAL
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • bodytext
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • BlinkList
  • Blogosphere News
  • E-mail this story to a friend!
  • Furl
  • LinkArena
  • Live
  • MisterWong
  • Print this article!
  • StumbleUpon
  • Technorati
  • Webnews.de
  • YahooMyWeb

INCOMING SEARCH TERMS


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!

    Like or Dislike: Thumb up 2 Thumb down 0

  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.

    Like or Dislike: Thumb up 0 Thumb down 0

Leave a Reply