Changeset View
Changeset View
Standalone View
Standalone View
scripts/ssh/ssh-auth.php
| #!/usr/bin/env php | #!/usr/bin/env php | ||||
| <?php | <?php | ||||
| $root = dirname(dirname(dirname(__FILE__))); | $root = dirname(dirname(dirname(__FILE__))); | ||||
| require_once $root.'/scripts/__init_script__.php'; | require_once $root.'/scripts/__init_script__.php'; | ||||
| $keys = id(new PhabricatorAuthSSHKeyQuery()) | $keys = id(new PhabricatorAuthSSHKeyQuery()) | ||||
| ->setViewer(PhabricatorUser::getOmnipotentUser()) | ->setViewer(PhabricatorUser::getOmnipotentUser()) | ||||
| ->withIsActive(true) | |||||
| ->execute(); | ->execute(); | ||||
| if (!$keys) { | if (!$keys) { | ||||
| echo pht('No keys found.')."\n"; | echo pht('No keys found.')."\n"; | ||||
| exit(1); | exit(1); | ||||
| } | } | ||||
| $bin = $root.'/bin/ssh-exec'; | $bin = $root.'/bin/ssh-exec'; | ||||
| ▲ Show 20 Lines • Show All 60 Lines • Show Last 20 Lines | |||||