Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14077534
D11800.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D11800.diff
View Options
diff --git a/scripts/ssh/ssh-exec.php b/scripts/ssh/ssh-exec.php
--- a/scripts/ssh/ssh-exec.php
+++ b/scripts/ssh/ssh-exec.php
@@ -19,6 +19,7 @@
EOSYNOPSIS
);
+$args->parseStandardArguments();
$args->parse(
array(
array(
diff --git a/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php b/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php
--- a/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php
+++ b/src/applications/diffusion/config/PhabricatorDiffusionConfigOptions.php
@@ -113,6 +113,7 @@
"Consider using SSH for authenticated access to repositories ".
"instead of HTTP.")),
$this->newOption('diffusion.ssh-user', 'string', null)
+ ->setLocked(true)
->setSummary(pht('Login username for SSH connections to repositories.'))
->setDescription(
pht(
@@ -120,12 +121,22 @@
'fill in this login username. If you have configured a VCS user '.
'like `git`, you should provide it here.')),
$this->newOption('diffusion.ssh-port', 'int', null)
+ ->setLocked(true)
->setSummary(pht('Port for SSH connections to repositories.'))
->setDescription(
pht(
'When constructing clone URIs to show to users, Diffusion by '.
'default will not display a port assuming the default for your '.
'VCS. Explicitly declare when running on a non-standard port.')),
+ $this->newOption('diffusion.ssh-host', 'string', null)
+ ->setLocked(true)
+ ->setSummary(pht('Host for SSH connections to repositories.'))
+ ->setDescription(
+ pht(
+ 'If you accept Phabricator SSH traffic on a different host '.
+ 'from web traffic (for example, if you use different SSH and '.
+ 'web load balancers), you can set the SSH hostname here. This '.
+ 'is an advanced option.')),
);
}
diff --git a/src/applications/repository/storage/PhabricatorRepository.php b/src/applications/repository/storage/PhabricatorRepository.php
--- a/src/applications/repository/storage/PhabricatorRepository.php
+++ b/src/applications/repository/storage/PhabricatorRepository.php
@@ -1006,6 +1006,11 @@
$uri->setUser($ssh_user);
}
+ $ssh_host = PhabricatorEnv::getEnvConfig('diffusion.ssh-host');
+ if (strlen($ssh_host)) {
+ $uri->setDomain($ssh_host);
+ }
+
$uri->setPort(PhabricatorEnv::getEnvConfig('diffusion.ssh-port'));
return $uri;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 12:04 AM (4 h, 22 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6776357
Default Alt Text
D11800.diff (2 KB)
Attached To
Mode
D11800: Allow a different SSH host to be set in Diffusion
Attached
Detach File
Event Timeline
Log In to Comment