Skip to content
Snippets Groups Projects
Commit 6c76f403 authored by jurgenhaas's avatar jurgenhaas
Browse files

#5 Remove drupal.org username as the git URLs are changing and SSH pub key...

#5 Remove drupal.org username as the git URLs are changing and SSH pub key authentication is now required
parent 700178d1
Branches
Tags
No related merge requests found
......@@ -26,7 +26,6 @@
"require": {
"composer-plugin-api": "^1.0.0",
"cypresslab/gitelephant": "~1.0",
"lakedrops/dotenv": "^0.1",
"php": ">=5.6"
},
"require-dev": {
......
......@@ -6,7 +6,6 @@ use Composer\Composer;
use Composer\IO\IOInterface;
use Composer\Script\Event;
use GitElephant\Repository;
use LakeDrops\Component\Dotenv\Dotenv;
use Symfony\Component\Filesystem\Filesystem;
/**
......@@ -84,7 +83,7 @@ class Handler {
$path = $installationManager->getInstallPath($package);
$this->io->write("- $project => $path", TRUE);
$this->prepareWorkingDirectory($path, $project, $version, $options['username']);
$this->prepareWorkingDirectory($path, $project, $version);
}
}
......@@ -95,13 +94,10 @@ class Handler {
* The options.
*/
protected function getOptions() {
$env = new Dotenv('dorgflow', $this->io);
$extra = $this->composer->getPackage()->getExtra() + ['dorgflow' => []];
$options = $extra['dorgflow'] + [
return $extra['dorgflow'] + [
'projects' => [],
'username' => $env->receive('drupal_org_username', 'Drupal.org username', getenv('USER')),
];
return $options;
}
/**
......@@ -113,12 +109,10 @@ class Handler {
* Name of the project.
* @param string $version
* Version to checkout.
* @param string $username
* Username on drupal.org.
*/
protected function prepareWorkingDirectory($path, $project, $version, $username) {
protected function prepareWorkingDirectory($path, $project, $version) {
list(, $projectname) = explode('/', $project);
$uri = $username . '@git.drupal.org:project/' . $projectname . '.git';
$uri = 'git@git.drupal.org:project/' . $projectname . '.git';
// Git Clone the repository into the working directory.
$repository = Repository::open($path);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment