[SOLVED, sort of] Re: svn+ssh over nonstandard port fails to connect

2007-06-29 Thread Chad Perrin
On Thu, Jun 28, 2007 at 04:22:55PM -0700, Christopher Cowart wrote:
 On Thu, Jun 28, 2007 at 04:44:10PM -0600, Chad Perrin wrote:
  On Thu, Jun 28, 2007 at 03:10:18PM -0700, Christopher Cowart wrote:
   On Thu, Jun 28, 2007 at 03:45:50PM -0600, Chad Perrin wrote:
I'm attempting to connect to a Subversion repository via SSH using a
nonstandard port to check out the repository.  The names and numbers in
the following have been changed to protect the guilty:

  svn co svn+ssh://[EMAIL PROTECTED]:1234/usr/home/svn-repos/project 
project
   
   Try:
   
   SVN_SSH=ssh -p 1234 svn co svn+ssh://[EMAIL PROTECTED]/path
  
  Are you suggesting setting an environment variable?  I have more than one
  repository checked out on this system, and they do not all use the same
  port for access.
 
 This is the only way I know to do it. You don't have to set it in your
 shell's environment if you use this syntax to prefix the specific
 command.

For a moment, I thought this wasn't going to work, because nothing like
that syntax seems to work in tcsh -- but then I remembered that, in this
case, the only reason I was even doing this was to test whether someone
else would be able to access the contents of the repository from
off-site, and that person is using bash.  As such, I tried a pretty much
verbatim copy of what you suggested from a bash prompt, and it worked, so
it should work for him.

In other words, my immediate problem is solved.  Thank you.

It seems odd that I cannot find an easier way around this with tcsh than
setting an environment variable, running the svn command I need, then
unsetting the environment variable, every time.  Coupled with the strange
argument quoting requirements of tcsh and the fact that it's easier to
get into trouble with weird filenames than in other shells I've used, I'm
tempted to go back to bash.


 
The result I get is as follows:

  ssh: 123.45.678.90:1234: hostname nor servname provided, or not known
  svn: Connection closed unexpectedly

Am I having a brainless moment here?  What am I missing?
   
   ssh doesn't support the hostname:port syntax. You have to use -p.
   
   Hope that helps,
  
  I thought that might be the case, but I'm not sure how to specify it in
  the svn command string -- which seems to be necessary since making a
  universal (to this user account) configuration change would then break
  access to other svn repositories.
 
 You can also create a new tunneling protocol. Look at the SSH
 authentication and authorization section of this part of the handbook:
 http://svnbook.red-bean.com/en/1.0/ch06s03.html

The information on that page seems specific to bash (though it's not
explicitly labeled as such), and I don't seem able to tailor it the needs
of tcsh.  Hopefully, I never find myself in need of accessing more than
one server using different nonstandard SSH ports to get at svn
repositories while using tcsh, I guess.

Anyway, I appreciate the help.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
awj @reddit: The terms never and always are never always true.
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: [SOLVED, sort of] Re: svn+ssh over nonstandard port fails to connect

2007-06-29 Thread Tom Evans
On Fri, 2007-06-29 at 04:23 -0600, Chad Perrin wrote:
 For a moment, I thought this wasn't going to work, because nothing like
 that syntax seems to work in tcsh -- but then I remembered that, in this
 case, the only reason I was even doing this was to test whether someone
 else would be able to access the contents of the repository from
 off-site, and that person is using bash.  As such, I tried a pretty much
 verbatim copy of what you suggested from a bash prompt, and it worked, so
 it should work for him.
 
 In other words, my immediate problem is solved.  Thank you.
 
 It seems odd that I cannot find an easier way around this with tcsh than
 setting an environment variable, running the svn command I need, then
 unsetting the environment variable, every time.  Coupled with the strange
 argument quoting requirements of tcsh and the fact that it's easier to
 get into trouble with weird filenames than in other shells I've used, I'm
 tempted to go back to bash.
 

Did you miss Albert Shih's reply (slightly modified)?

 Put something like
   [tunnels]
 myssh=/usr/bin/ssh -p 1234 123.45.678.90
 in 
 ~/.subversion/config
 and use
 svn co svn+myssh://usr/home/svn-repos/project

You can then clearly define as many transports as you like, which
requires no setting of environment variables and is shell-agnostic.

Full details are described in the redbook:
http://svnbook.red-bean.com/nightly/en/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.sshauth

In fact, if you had read the svn+ssh portion of the redbook, you would
have come across this sentence:

This example demonstrates a couple of things. First, it shows how to
make the Subversion client launch a very specific tunneling binary (the
one located at /opt/alternate/ssh) with specific options. In this case,
accessing a svn+joessh:// URL would invoke the particular SSH binary
with -p 29934 as arguments — useful if you want the tunnel program to
connect to a non-standard port.

Reading the manual is good.


signature.asc
Description: This is a digitally signed message part


Re: [SOLVED, sort of] Re: svn+ssh over nonstandard port fails to connect

2007-06-29 Thread Chad Perrin
On Fri, Jun 29, 2007 at 02:54:36PM +0100, Tom Evans wrote:
 
 Did you miss Albert Shih's reply (slightly modified)?

Actually, I was reading replies from the top of the thread down, and was
still looking into what he said (in the midst of dealing with other
things that came up), so hadn't gotten back to the list yet.


 
  Put something like
  [tunnels]
  myssh=/usr/bin/ssh -p 1234 123.45.678.90
  in 
  ~/.subversion/config
  and use
  svn co svn+myssh://usr/home/svn-repos/project
 
 You can then clearly define as many transports as you like, which
 requires no setting of environment variables and is shell-agnostic.
 
 Full details are described in the redbook:
 http://svnbook.red-bean.com/nightly/en/svn.serverconfig.svnserve.html#svn.serverconfig.svnserve.sshauth
 
 In fact, if you had read the svn+ssh portion of the redbook, you would
 have come across this sentence:
 
 This example demonstrates a couple of things. First, it shows how to
 make the Subversion client launch a very specific tunneling binary (the
 one located at /opt/alternate/ssh) with specific options. In this case,
 accessing a svn+joessh:// URL would invoke the particular SSH binary
 with -p 29934 as arguments ??? useful if you want the tunnel program to
 connect to a non-standard port.
 
 Reading the manual is good.

Apparently, reading it *recently* -- rather than just skimming to refresh
my memory -- seems to be key in this case.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
print substr(Just another Perl hacker, 0, -2);
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]