Defect #2187

Subversion and Certification Validation Error

Added by Simone Carletti over 10 years ago. Updated over 6 years ago.

Status:Needs feedbackStart date:2008-11-14
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:SCM
Target version:-
Resolution: Affected version:0.7.3

Description

This issue is a follow up from #1235 and #787.

Jean-Philippe Lang wrote:

The validation of the certificate won't be done automatically by the app.
I've just added your work around to the FAQ.

Thanks.

I've come across the same issue today and I've just discovered this is not intended to be fixed.
I'd like to give my two cents about this issue.

1. The client could easily answer the question by accepting the certificate temporarily and logging the activity. Capistrano already implements a prompt handler for common svn questions.
Have a look at subversion.rb file within the capistrano package, method handle_data

        # Determines what the response should be for a particular bit of text
        # from the SCM. Password prompts, connection requests, passphrases,
        # etc. are handled here.
        def handle_data(state, stream, text)
          host = state[:channel][:host]
            logger.info "[#{host} :: #{stream}] #{text}" 
          case text
          when /\bpassword.*:/i
            # subversion is prompting for a password
            "#{scm_password_prompt}\n" 
          when %r{\(yes/no\)}
            # subversion is asking whether or not to connect
            "yes\n" 
          when /passphrase/i
            # subversion is asking for the passphrase for the user's key
            "#{variable(:scm_passphrase)}\n" 
          when /The entry \'(.+?)\' is no longer a directory/
            raise Capistrano::Error, "subversion can't update because directory '#{$1}' was replaced. Please add it to svn:ignore." 
          when /accept \(t\)emporarily/
            # subversion is asking whether to accept the certificate
            "t\n" 
          end
        end

2. Even if you decide to not handle data, I would suggest to provide a more meaningful error message. Current error message is generic for any SVN response issue and doesn't give any idea about what's the real error. You should turn on debugging log level and try to manally reproduce the issue by reading exception backtraces.

This is completely unfriendly for people who doesn't have a deep Redmine and/or Rails knowledge.

History

#1 Updated by Eric Coleman over 10 years ago

It would seem that if you follow the FAQ instructions and use ./svn/.subversion to store the credentials, you have to hack the api and change the SVN_BIN var.

Is there a way to specify the command from some kind of configuration so I don't need to physically adjust the API?

#2 Updated by Daniel Felix over 6 years ago

  • Status changed from New to Needs feedback

Any news on this?

Anyone some suggestion how to fix this?

Also available in: Atom PDF