Changeset View
Changeset View
Standalone View
Standalone View
src/applications/almanac/util/AlmanacKeys.php
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | final class AlmanacKeys extends Phobject { | ||||
public static function getClusterSSHUser() { | public static function getClusterSSHUser() { | ||||
// NOTE: When instancing, we currently use the SSH username to figure out | // NOTE: When instancing, we currently use the SSH username to figure out | ||||
// which instance you are connecting to. We can't use the host name because | // which instance you are connecting to. We can't use the host name because | ||||
// we have no way to tell which host you think you're reaching: the SSH | // we have no way to tell which host you think you're reaching: the SSH | ||||
// protocol does not have a mechanism like a "Host" header. | // protocol does not have a mechanism like a "Host" header. | ||||
$username = PhabricatorEnv::getEnvConfig('cluster.instance'); | $username = PhabricatorEnv::getEnvConfig('cluster.instance'); | ||||
if (strlen($username)) { | if (strlen($username)) { | ||||
return $username; | // return $username; | ||||
} | } | ||||
$username = PhabricatorEnv::getEnvConfig('diffusion.ssh-user'); | $username = PhabricatorEnv::getEnvConfig('diffusion.ssh-user'); | ||||
if (strlen($username)) { | if (strlen($username)) { | ||||
return $username; | return $username; | ||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
} | } |