From ef74b9b88b87f5be5a4cad55872d60e3a6085e64 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 12 Mar 2012 10:34:27 -0700 Subject: [PATCH] Improve messaging around passworded SSH keys Summary: It would be better to test if a key is passworded, but I couldn't figure out how to do that. Test Plan: Ran "test_connection.php" Reviewers: btrahan Reviewed By: btrahan CC: aran, epriestley Maniphest Tasks: T924 Differential Revision: https://secure.phabricator.com/D1856 --- scripts/repository/test_connection.php | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/scripts/repository/test_connection.php b/scripts/repository/test_connection.php index 9325ae2207..4849ea9ac5 100755 --- a/scripts/repository/test_connection.php +++ b/scripts/repository/test_connection.php @@ -2,7 +2,7 @@ getVersionControlSystem(); PhutilServiceProfiler::installEchoListener(); +echo phutil_console_format( + "\n". + "**NOTE:** If you are prompted for an SSH password in the next step, the\n". + "daemon won't work because it doesn't have the password and can't respond\n". + "to an interactive prompt. Instead of typing the password, it will hang\n". + "forever when prompted. There are several ways to resolve this:\n\n". + " - Run the daemon inside an ssh-agent session where you have unlocked\n". + " the key (most secure, but most complicated).\n". + " - Generate a new, passwordless certificate for the daemon to use\n". + " (usually quite easy).\n". + " - Remove the passphrase from the key with `ssh-keygen -p`\n". + " (easy, but questionable)."); + +phutil_console_confirm('Did you read all that?', $default_no = false); + echo "Trying to connect to the remote...\n"; switch ($vcs) { case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN: