Page MenuHomePhabricator

D7755.diff

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
@@ -109,6 +109,13 @@
'When constructing clone URIs to show to users, Diffusion will '.
'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)
+ ->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.')),
);
}
diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php
--- a/src/applications/diffusion/controller/DiffusionRepositoryController.php
+++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php
@@ -185,11 +185,7 @@
$uri->setUser($ssh_user);
}
- // This isn't quite right, but for now it's probably better to drop
- // the port than sometimes show ":8080", etc. Using most VCS commands
- // against nonstandard ports is a huge pain so few installs are likely
- // to configure SSH on a nonstandard port.
- $uri->setPort(null);
+ $uri->setPort(PhabricatorEnv::getEnvConfig('diffusion.ssh-port'));
$clone_uri = $this->renderCloneURI(
$uri,

File Metadata

Mime Type
text/x-diff
Storage Engine
amazon-s3
Storage Format
Raw Data
Storage Handle
phabricator/zc/ck/tu2iv6etii3ii2ww
Default Alt Text
D7755.diff (1 KB)

Event Timeline