Skip to content

Commit ef74b9b

Browse files
author
epriestley
committed
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
1 parent d5bf30b commit ef74b9b

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

scripts/repository/test_connection.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<?php
33

44
/*
5-
* Copyright 2011 Facebook, Inc.
5+
* Copyright 2012 Facebook, Inc.
66
*
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
@@ -57,6 +57,21 @@
5757

5858
PhutilServiceProfiler::installEchoListener();
5959

60+
echo phutil_console_format(
61+
"\n".
62+
"**NOTE:** If you are prompted for an SSH password in the next step, the\n".
63+
"daemon won't work because it doesn't have the password and can't respond\n".
64+
"to an interactive prompt. Instead of typing the password, it will hang\n".
65+
"forever when prompted. There are several ways to resolve this:\n\n".
66+
" - Run the daemon inside an ssh-agent session where you have unlocked\n".
67+
" the key (most secure, but most complicated).\n".
68+
" - Generate a new, passwordless certificate for the daemon to use\n".
69+
" (usually quite easy).\n".
70+
" - Remove the passphrase from the key with `ssh-keygen -p`\n".
71+
" (easy, but questionable).");
72+
73+
phutil_console_confirm('Did you read all that?', $default_no = false);
74+
6075
echo "Trying to connect to the remote...\n";
6176
switch ($vcs) {
6277
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:

0 commit comments

Comments
 (0)