Commit Graph

6 Commits

Author SHA1 Message Date
brian m. carlson
296311634c
ssh: redirect stdin from /dev/null
When using SSH cloning with a ControlMaster socket and a password on a
Unix system, we're unable to read from standard input and consequently
the SSH process fails. The redirect from standard input was intended to
fix an issue on Windows that is due to /dev/tty disappearing, but it
doesn't appear to work and causes issues on Unix systems. Revert this
change so we can explore other options.

This reverts commit 59ed04855afd7e8f1bb126eb6f6a5c5297f59253.
2019-07-19 16:00:21 +00:00
brian m. carlson
59ed04855a
lfshttp: pass stdin to ssh
Some people have SSH prompt them for their passphrase when a key is
used. In such a situation, the user needs to be able to enter a password
on standard input so that they can use their key. When invoking ssh,
pass our standard input through to the ssh process so that it can prompt
the user if needed.
2019-04-24 20:26:51 +00:00
brian m. carlson
912891d48f subprocess: add functions to format shell commands
There are a small number of places where we'll want to pass data to the
shell.  Add a function which formats a command name and arguments into a
command that invokes "sh -c" with the appropriate args.  Additionally
add a form that quotes its arguments, and use this in the SSH code,
which wants to pass data to the shell.
2018-09-14 22:31:39 +00:00
brian m. carlson
899168eb50 tools: move ShellQuote to subprocess
In a future commit, we'll be adding some additional shell-related
handling which logically belongs to the subprocess package.  To avoid an
import loop, move the ShellQuote function and its required variable from
the tools package to the subprocess package.  Update the only caller of
this function.

This commit contains no functional change.
2018-09-14 21:50:09 +00:00
Preben Ingvaldsen
162d42db76 Merge branch 'master' into lfshttp 2018-09-14 11:42:19 -07:00
Preben Ingvaldsen
d101bdb605 lfsapi: extract new lfshttp package
Extract more basic http-related functionality out of lfsapi and
into a new package, lfshttp. Everything is currently functional
aside from authorization.
2018-09-11 14:51:29 -07:00