darcs

Issue 1970 ssh urls not supported?

Title ssh urls not supported?
Priority bug Status resolved
Milestone 2.8.0 Resolved in 2.8.0
Superseder accept URIs for ssh repos (eg sftp://droundy@darcs.net:10022/foo/bar)
View: 1575
Nosy List dagit, dmitry.kurochkin, galbolle
Assigned To galbolle
Topics

Created on 2010-10-12.17:22:52 by dagit, last changed 2010-11-21.12:43:36 by noreply.

Messages
msg12687 (view) Author: dagit Date: 2010-10-12.17:22:50
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
msg13009 (view) Author: kowey Date: 2010-11-12.17:17:36
Merging with issue1575
msg13134 (view) Author: noreply Date: 2010-11-21.12:43:35
The following patch sent by Florent Becker <florent.becker@ens-lyon.org> updated issue issue1970 with
status=resolved;resolvedin=2.8.0 HEAD

* resolve issue1970: allow ssh:// urls 
Ignore-this: 90ada77620504d0e4f1183a401e47da1
History
Date User Action Args
2010-10-12 17:22:52dagitcreate
2010-11-02 10:06:14galbollesetstatus: unknown -> has-patch
assignedto: galbolle
nosy: + galbolle
2010-11-12 17:17:37koweysetstatus: has-patch -> duplicate
messages: + msg13009
superseder: + accept URIs for ssh repos (eg sftp://droundy@darcs.net:10022/foo/bar)
2010-11-21 12:43:36noreplysetstatus: duplicate -> resolved
messages: + msg13134
resolvedin: 2.8.0