mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-30 01:10:58 +01:00
Specify an ssh port for Diffusion when running against the grain
Summary: We run `git` on a different port than 22, so would like to reflect this change in the UI. Test Plan: Set diffusion.ssh-port in settings, then make sure it's reflected on the Diffusion repository Clone URI. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: Korvin, epriestley, aran, dctrwatson Differential Revision: https://secure.phabricator.com/D7755
This commit is contained in:
parent
052c83a613
commit
c3d9c28382
2 changed files with 8 additions and 5 deletions
|
@ -109,6 +109,13 @@ final class PhabricatorDiffusionConfigOptions
|
|||
'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.')),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -185,11 +185,7 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
$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,
|
||||
|
|
Loading…
Reference in a new issue