From 2208e9703c65874cdcbeb22f764fee9339fff00a Mon Sep 17 00:00:00 2001 From: yarikoptic Date: Fri, 12 Jan 2018 14:56:43 +0000 Subject: initial question about ssh urls support --- ..._urls_via___34__built-in__34___ssh_support.mdwn | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 doc/todo/support_ssh__58____47____47___or_sftp__58____47____47___urls_via___34__built-in__34___ssh_support.mdwn diff --git a/doc/todo/support_ssh__58____47____47___or_sftp__58____47____47___urls_via___34__built-in__34___ssh_support.mdwn b/doc/todo/support_ssh__58____47____47___or_sftp__58____47____47___urls_via___34__built-in__34___ssh_support.mdwn new file mode 100644 index 000000000..ccb891df8 --- /dev/null +++ b/doc/todo/support_ssh__58____47____47___or_sftp__58____47____47___urls_via___34__built-in__34___ssh_support.mdwn @@ -0,0 +1,38 @@ +ATM git-annex passes sftp:// urls to be handled with curl. +But that one does not (re)use established ssh control sockets and/or credentials + +E.g. + +[[!format sh """ +$> git annex addurl --debug sftp://localhost/tmp/123 +[2018-01-12 09:53:35.195801836] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","show-ref","git-annex"] +[2018-01-12 09:53:35.199709648] process done ExitSuccess +[2018-01-12 09:53:35.199781091] read: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","show-ref","--hash","refs/heads/git-annex"] +[2018-01-12 09:53:35.203370157] process done ExitSuccess +[2018-01-12 09:53:35.204373706] chat: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","cat-file","--batch"] +[2018-01-12 09:53:35.204819259] chat: git ["--git-dir=.git","--work-tree=.","--literal-pathspecs","cat-file","--batch-check=%(objectname) %(objecttype) %(objectsize)"] +addurl sftp://localhost/tmp/123 [2018-01-12 09:53:35.208782745] read: curl ["-s","--head","-L","sftp://localhost/tmp/123","-w","%{http_code}","--user-agent","git-annex/6.20171211+gitgba511f4de-1~ndall+1"] +[2018-01-12 09:53:35.290168768] process done ExitFailure 51 + +[2018-01-12 09:53:35.290835362] call: wget ["-nv","--show-progress","--clobber","-c","-O","/tmp/bu/.git/annex/tmp/URL--sftp&c%%localhost%tmp%123","sftp://localhost/tmp/123","--user-agent","git-annex/6.20171211+gitgba511f4de-1~ndall+1"] +sftp://localhost/tmp/123: Unsupported scheme ‘sftp’. +[2018-01-12 09:53:35.299065531] process done ExitFailure 1 +failed +[2018-01-12 09:53:35.299781408] process done ExitSuccess +[2018-01-12 09:53:35.299993431] process done ExitSuccess +git-annex: addurl: 1 failed + + +"""]] + +So far we haven't managed to make curl behave sanely with sftp urls without us passing explicitly the login name and then a password and then it still failed: + +[[!format sh """ +$> curl sftp://localhost/tmp/123 -u yoh +Enter host password for user 'yoh': +curl: (51) SSL peer certificate or SSH remote key was not OK +"""]] + +I wondered if it would be feasible for git annex natively support ssh (scp) and/or sftp urls? All the machinery is there since it deals with copying files over ssh already. + +[[!meta author=yoh]] -- cgit v1.2.3