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.
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.
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.
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.
Extract more basic http-related functionality out of lfsapi and
into a new package, lfshttp. Everything is currently functional
aside from authorization.