[darcs-devel] [issue1970] ssh urls not supported?

Jason Dagit bugs at darcs.net
Tue Oct 12 17:22:52 UTC 2010


New submission from Jason Dagit <no-reply at example.com>:

I can't tell if this is not supported or just a user error.


$ darcs push ssh://code.haskell.org/foo
darcs: Pushing to ssh URLs is not supported.
You may be able to hack this to work using DARCS_APPLY_SSH


Okay, so I'll check --help, okay no mention of that variable.  Next I checked 'darcs help 
environment':

$ darcs help environment | grep -i ssh
DARCS_SSH:
  repositories, which Darcs accesses with the external program ssh(1).
  The environment variable $DARCS_SSH can be used to specify an
  alternative SSH client.  Arguments may be included, separated by
  $DARCS_SCP and $DARCS_SFTP respectively, which behave like $DARCS_SSH.
SSH_PORT:
  number for all SSH calls made by Darcs (when accessing remote
  repositories over SSH).  This is useful if your SSH server does not
  run on the default port, and your SSH client does not support
  ssh_config(5).  OpenSSH users will probably prefer to put something
  like `Host *.example.net Port 443' into their ~/.ssh/config file.

It's not mentioned there either.  So I looked on google, google finds only 6 results for 
"DARCS_APPLY_SSH".  None of them seemed to document the feature.

So, it appears there are two separate "bugs" here:
  a) ssh URLs do not appear to be supported
  b) the error message tells the user to do something that is not documented

I propose that darcs should support ssh as a protocol (and document it?).  It seems that 
there are multiple ways to support the ssh protocol:
  * http://www.kernel.org/pub/software/scm/git/docs/git-push.html
    * git supports the following ssh/scp paths
    * ssh://[user@]host.xz[:port]/path/to/repo.git/
    * [user@]host.xz:path/to/repo.git/
    * ssh://[user@]host.xz[:port]/~[user]/path/to/repo.git/
  * http://bitworking.org/news/Getting_subversion_svn_ssh____to_work_with_PuTTY
    * svn supports an "svn+ssh" protocol
    * svn+ssh://myusername@bitworking.org/home/myusername/archives/test
  * http://mercurial.selenic.com/wiki/QuickStart
    * mercurial supports something similar
    * hg push ssh://user@example.com/hg/

The darcs lack of support for ssh protocol seems like a UI failing given how common it is 
with other vcs.  My vote is to handle the alternatives and syntax supported by git, 
especially considering we already support the scp variant.  Perhaps if we have this we 
can even remove the (undocumented) DARCS_APPLY_SSH environment variable.

I can't imagine that the URL parsing/translation is terribly difficult.  I think we're 
mainly needing consensus and some good unit tests.

Jason

----------
messages: 12687
milestone: 2.8.0 HEAD
nosy: dagit, dmitry.kurochkin
priority: bug
status: unknown
title: ssh urls not supported?

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue1970>
__________________________________


More information about the darcs-devel mailing list