Can't connect Redmine to SVN repository via https
Added by Francesco Giusto almost 10 years ago
Hi everybody,
this problem is bugging me from several days, I searched and tried the different solutions I found on this board and on the internet with no success.
The problem is common: I installed Redmine and can't make it talk with my svn server.
The production.log shows the infamous error message:
No close tag for /lists/list
Line: 4
Position: 114
Last 80 unconsumed characters:Output was:
<lists>
<list
path="https://my/path/to/svn/repo">
Configuration:
Redmine installed via BITNAMI Stack on Windows -> redmine-2.5.2-1
O.S. -> Windows Server 2008
svn client on redmine server -> SlikSVN 1.8.10
svn server -> VisualSVN Server 2.1.1 (using svn 1.6.9)
Redmine server and svn server are on different servers
In administration I put the full path of the svn executable:
This was achieved modifying both subversion_adapter.rb at the SVN_BIN section
SVN executable name
SVN_BIN = Redmine::Configuration['scm_subversion_command'] || "C:/SlikSvn/bin/svn.exe"
and the configuration.yml file
scm_subversion_command: C:/SlikSvn/bin/svn.exe
In addition to this, following other posts on the internet I modified this other section of the subversion_adapter.rb file adding this options
def credentials_string
str = ''
str << " --username #{shell_quote(kurumi kurogi)}" unless @login.blank?
str << " --password #{shell_quote(asami morita)}" unless @login.blank? || @password.blank?
str << " --trust-server-cert --no-auth-cache --non-interactive"
str
end
All of this did not resolve anything and the production.log showed the same No close tag for /lists/list error.
Since I read this FAQ on the topic (http://www.redmine.org/projects/redmine/wiki/FAQ) I tried to manually checkout the repositories from the svn server using the command prompt and this command:
svn --config-dir ./svn/.subversion co https://my/svn/repo delete-me
The command looked like it worked, since after telling that I wanted to accept permanently the certificate, and inserting the svn credentials it printed a list of all the files in my repo while it was checking out.
But the error it's still here :(
Always from the command prompt if I write:
"C:/SlikSvn/bin/svn.exe" list --xml "https://my/svn/repo/"@HEAD --username xxxx --password > xxxx --trust-server-cert --no-auth-cache --non-interactive
it works, and the xml output seems correct, showing a list of svn commits.
NOTE OF INTEREST
If I insert the option --tolerant-ssl in the subversion_adapter.rb file the error in the production.log file changes like this:
Started GET "/redmine/projects/test/repository" for 127.0.0.1 at 2014-09-10 09:56:24 +0200
Processing by RepositoriesController#show as HTML
Parameters: {"id"=>"test"}
Current user: my.user (id=1)
Error parsing svn output: undefined method `[]' for nil:NilClass
Output was:
I tried to fix this error giving the full path of the svn exe, with no luck again.
I'm starting to lose hope.
thanks everybody
Replies (2)
RE: Can't connect Redmine to SVN repository via https
-
Added by Francesco Giusto almost 10 years ago
Ok, looks like I resolved.
I used the hint (something I already did but this time worked) contained in this howto (http://www.redmine.org/projects/redmine/wiki/Error_parsing_svn_output)
Note for Bitnami Redmine installation on Windows
The Redmine servers(Thin for versions > 2.0] by default run under the System account and this does not work wrong SSL certificate for SVN server. The solution is to change the process account for a service user with logon privilege, connect to SVN and accept permanently the certificate for that user. Don't forget to change the user for the two Thin or Mongrel services running in load balancing.Another possible solution to parliamentary accept wrong SVN certificate is to use psexec. Command below shows console for system user account where svn command may be issued and certificate permanently accepted:
psexec -i -s cmd.exe
So I ran psexec as stated in the example, cleaned my browser cache and suddenly Redmine started ingesting the revisions from my svn repos. Whooo!! :)
RE: Can't connect Redmine to SVN repository via https
-
Added by Terry Hwang almost 10 years ago
Thank you for the solution.
In special environment on Windows, like Bitnami, the change of privilege causes Redmine service not working.
So I modified subversion_adapter.rb to point the svb configuration folder.
# SVN executable name SVN_BIN = Redmine::Configuration['scm_subversion_command'] || "svn" # SVN configuration folder SVN_CONFIG = "--config-dir C:/Users/Administrator/AppData/Roaming/Subversion" class << self def client_config @@client_config ||= SVN_CONFIG end # Get info about the svn repository, add parameter for configuration folder in every svn command def info cmd = "#{self.class.sq_bin} #{self.class.client_config} info --xml #{target}
I hope this resolve your problem easy.