Capistrano and svn+ssh on non-standard port


I have ssh configured with a non-standard port, and I use svn+ssh to
access to my repository. As the svn+ssh protocol doesn’t support the
colon convention to specify the port, I export the SVN_SSH variable in
.bashrc, like this…
SVN_SSH=“ssh -p 2323”

Now I can do a checkout from the command like using something like

svn checkout svn+ssh://

It works. But now I try to use this configuration in Capistrano, by

set :repository, “svn+ssh://”
ssh_options[:port] = 2323

I’m running Capistrano with the user account that has the SVN_SSH
defined in .bashrc, and it doesn’t work. I’m getting an error like this
when trying to deploy

[] executing command
** [out ::] ssh: connect to host port 22:
Connection refused
** [out ::] svn: Connection closed unexpectedly

Does anyone has any idea on which could be the problem, and/or how to
solve it?

Thanks in advance.


I’ve solved it!

This is how I did it:
I’ve removed the SVN_SSH environment variable that I had in my .bashrc,
and instead I’ve indicated the non-standard port in
~/.subversion/config, adding the following line in the [tunnels]

ssh = $SVN_SSH ssh -p 2323