mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-09 14:21:02 +01:00
bb4904553f
Summary: - Add web UI for configuring SSH hosting. - Route git reads (`git-upload-pack` over SSH). Test Plan: >>> orbital ~ $ git clone ssh://127.0.0.1/ Cloning into '127.0.0.1'... Exception: Unrecognized repository path "/". Expected a path like "/diffusion/X/". fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. >>> orbital ~ $ git clone ssh://127.0.0.1/diffusion/X/ Cloning into 'X'... Exception: No repository "X" exists! fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. >>> orbital ~ $ git clone ssh://127.0.0.1/diffusion/MT/ Cloning into 'MT'... Exception: This repository is not available over SSH. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. >>> orbital ~ $ git clone ssh://127.0.0.1/diffusion/P/ Cloning into 'P'... Exception: TODO: Implement serve over SSH. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. Reviewers: btrahan Reviewed By: btrahan CC: hach-que, aran Maniphest Tasks: T2230 Differential Revision: https://secure.phabricator.com/D7421
26 lines
474 B
PHP
26 lines
474 B
PHP
<?php
|
|
|
|
final class DiffusionSSHGitUploadPackWorkflow
|
|
extends DiffusionSSHGitWorkflow {
|
|
|
|
public function didConstruct() {
|
|
$this->setName('git-upload-pack');
|
|
$this->setArguments(
|
|
array(
|
|
array(
|
|
'name' => 'dir',
|
|
'wildcard' => true,
|
|
),
|
|
));
|
|
}
|
|
|
|
public function isReadOnly() {
|
|
return true;
|
|
}
|
|
|
|
public function getRequestPath() {
|
|
$args = $this->getArgs();
|
|
return head($args->getArg('dir'));
|
|
}
|
|
|
|
}
|