aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar yarikoptic <yarikoptic@web>2018-01-12 14:56:43 +0000
committerGravatar admin <admin@branchable.com>2018-01-12 14:56:43 +0000
commit2208e9703c65874cdcbeb22f764fee9339fff00a (patch)
treec8ae3c97aabed8d970ab38bf052ac35d8b7d87af
parentf6bf38aab0e1e728711712eb26eeac986e9808e2 (diff)
initial question about ssh urls support
-rw-r--r--doc/todo/support_ssh__58____47____47___or_sftp__58____47____47___urls_via___34__built-in__34___ssh_support.mdwn38
1 files changed, 38 insertions, 0 deletions
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]]