Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

silverstripe/sapphire is a private repos ?


Go to End
Reply


9 Posts   1382 Views

Avatar
am

Community Member, 3 Posts

25 May 2013 at 12:10am

Hello,

I'm trying to install SilverStripe with composer but it fails:

composer create-project silverstripe/installer htdocs 3.1.0-beta3
Installing silverstripe/installer (3.1.0-beta3)
- Installing silverstripe/installer (3.1.0-beta3)
Downloading: 100%

Created project in htdocs
Loading composer repositories with package information
Installing dependencies from lock file
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
- Installing composer/installers (dev-master d6d0914)
Cloning d6d091410adecb7385733809a9d9237ed642c81c

- Installing silverstripe/framework (3.1.0-beta3)
Downloading: connection...
Could not fetch https://api.github.com/repos/silverstripe/sapphire/zipball/3.1.0-beta3, enter your GitHub credentials to access private repos
The credentials will be swapped for an OAuth token stored in /home/am/.composer/config.json, your password will not be stored
To revoke access to this token you can visit https://github.com/settings/applications
Username:
Password:

(same problem with 3.0.5)

could you make silverstripe/sapphire public on github ?

Avatar
kinglozzer

Community Member, 166 Posts

25 May 2013 at 3:16am

Edited: 25/05/2013 3:17am

Hi,

The repo isn't private, but it was recently renamed from 'sapphire' to 'silverstripe-framework', perhaps that is what's causing your issue? Try running:

composer self-update

and then try again. If that doesn't work, then try:

composer create-project silverstripe/installer htdocs 3.1.*@dev

Avatar
am

Community Member, 3 Posts

26 May 2013 at 2:32am

Tanks for your reply.

I have done:

composer self-update

composer -vvv create-project silverstripe/installer htdocs 3.1.0-beta3
Downloading https://packagist.org/packages.json
Writing /home/am/.composer/cache/repo/https---packagist.org/packages.json into cache
Downloading https://packagist.org/p/provider-active$4b9642bab877cc771a3b50b8979cb2951fac328b3b3249702f8d30a6e21a0e15.json
Writing /home/am/.composer/cache/repo/https---packagist.org/p-provider-active.json into cache
Downloading https://packagist.org/p/provider-archived$582bf372706e0ae2f791bbd066fc3ece73b33736a440ebf2acbb3bc72fe7aa2e.json
Writing /home/am/.composer/cache/repo/https---packagist.org/p-provider-archived.json into cache
Downloading https://packagist.org/p/provider-latest$921c0c8753a34b0ec990196b877b12703835a7e3f8edb4386d9ea6c6ac81c12d.json
Writing /home/am/.composer/cache/repo/https---packagist.org/p-provider-latest.json into cache
Downloading https://packagist.org/p/provider-stale$7502c2a89ed9410c017271b3537a4226f1e553c9d8c1e21154a09d96008ef7f0.json
Writing /home/am/.composer/cache/repo/https---packagist.org/p-provider-stale.json into cache
Reading /home/am/.composer/cache/repo/https---packagist.org/provider-silverstripe$installer.json from cache
Installing silverstripe/installer (3.1.0-beta3)
- Installing silverstripe/installer (3.1.0-beta3)
Reading /home/am/.composer/cache/files/silverstripe/installer/3.1.0.0-beta3-3.1.0-beta3.zip from cache
Loading from cache
Extracting archive

Created project in htdocs
Downloading composer.json
Downloading composer.lock
Loading composer repositories with package information
Installing dependencies from lock file
Downloading composer.lock
Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them.
- Installing composer/installers (dev-master d6d0914)
Cloning d6d091410adecb7385733809a9d9237ed642c81c
Executing command (CWD): git clone 'git://github.com/composer/installers.git' '/var/www/htdocs/vendor/composer/installers' && cd '/var/www/htdocs/vendor/composer/installers' && git remote add composer 'git://github.com/composer/installers.git' && git fetch composer
Executing command (/var/www/htdocs/vendor/composer/installers): git remote set-url --push origin 'git@github.com:composer/installers.git'
Executing command (/var/www/htdocs/vendor/composer/installers): git branch -r
Executing command (/var/www/htdocs/vendor/composer/installers): git checkout 'master'
Executing command (/var/www/htdocs/vendor/composer/installers): git reset --hard 'd6d091410adecb7385733809a9d9237ed642c81c'

- Marking composer/installers (1.0.x-dev d6d0914) as installed, alias of composer/installers (dev-master d6d0914)

- Installing silverstripe/framework (3.1.0-beta3)
Downloading https://api.github.com/repos/silverstripe/sapphire/zipball/3.1.0-beta3
Downloading: connection...
Could not fetch https://api.github.com/repos/silverstripe/sapphire/zipball/3.1.0-beta3, enter your GitHub credentials to access private repos
The credentials will be swapped for an OAuth token stored in /home/am/.composer/config.json, your password will not be stored
To revoke access to this token you can visit https://github.com/settings/applications
Username:
Password:

still asking for username/password , it's look like it is going to get 'sapphire' and not 'silverstripe-framework'

I also removed ~/.composer/cache/ no more luck

I have done grep sapphire in htdocs/vendor/composer/ without finding any references, I still trying to understand how it works.

also

composer create-project silverstripe/installer htdocs 3.1.*@dev

[InvalidArgumentException]
Could not find package silverstripe/installer with version 3.1.*@dev.


doesn't work

regards

Avatar
melts

Community Member, 1 Post

27 May 2013 at 1:28pm

I'm seeing the same error as well

php composer.phar create-project silverstripe/installer ./silverstripe
Installing silverstripe/installer (3.0.5)
- Installing silverstripe/installer (3.0.5)
Downloading: 100%

Created project in ./silverstripe
Loading composer repositories with package information
Installing dependencies from lock file
- Installing composer/installers (dev-master v1.0.2)
Cloning v1.0.2

- Installing silverstripe/framework (3.0.5)
Downloading: connection...
Could not fetch https://api.github.com/repos/silverstripe/sapphire/zipball/3.0.5, enter your GitHub credentials to access private repos
The credentials will be swapped for an OAuth token stored in /home/melts/.composer/config.json, your password will not be stored
To revoke access to this token you can visit https://github.com/settings/applications
Username: ^C

and i checked to ensure i was up to date -

php composer.phar self-update
You are using the latest composer version.

so I was recommended to try this but its so far been a far from normal process getting it installed. I'll probably revisit the install instructions and see if i can skip composter and do things normally..

Avatar
simon_w

Forum Moderator, 474 Posts

28 May 2013 at 8:18am

The problem is that the composer.lock file in the tags references the old URL, which currently doesn't redirect properly. I've informed GitHub and they're looking into making it redirect.

In the meantime, you can use a branch instead of a tag.

So:

composer create-project silverstripe/installer silverstripe 3.0.x-dev

for 3.0
or

composer create-project silverstripe/installer silverstripe 3.1.x-dev

for 3.1.

Avatar
am

Community Member, 3 Posts

28 May 2013 at 9:34am

Does updating composer.lock with new URL would solve the problem ?

and using 3.?.x-dev gives

- Installing silverstripe/framework (3.1.x-dev 2b9a44e)
Cloning 2b9a44ef67b4aef3cde7561fe3857a47138ca5ef
Executing command (CWD): git clone 'git://github.com/silverstripe/silverstripe-framework.git' 'framework/' && cd 'framework/' && git remote add composer 'git://github.com/silverstripe/silverstripe-framework.git' && git fetch composer
Executing command (framework/): git remote set-url --push origin 'git@github.com:silverstripe/silverstripe-framework.git'
Executing command (framework/): git branch -r
Executing command (framework/): git checkout '3.1'
Executing command (framework/): git checkout -B '3.1' 'composer/3.1'
Executing command (framework/): git checkout '2b9a44ef67b4aef3cde7561fe3857a47138ca5ef' && git reset --hard '2b9a44ef67b4aef3cde7561fe3857a47138ca5ef'

[RuntimeException]
Failed to execute git checkout '2b9a44ef67b4aef3cde7561fe3857a47138ca5ef' && git reset --hard '2b9a44ef67b4aef3cde7561fe3857a47138ca
5ef'

fatal: Not a git repository (or any of the parent directories): .git

Exception trace:
() at phar:///usr/local/bin/composer/src/Composer/Downloader/GitDownloader.php:259
Composer\Downloader\GitDownloader->updateToCommit() at phar:///usr/local/bin/composer/src/Composer/Downloader/GitDownloader.php:43
Composer\Downloader\GitDownloader->doDownload() at phar:///usr/local/bin/composer/src/Composer/Downloader/VcsDownloader.php:59
Composer\Downloader\VcsDownloader->download() at phar:///usr/local/bin/composer/src/Composer/Downloader/DownloadManager.php:177
Composer\Downloader\DownloadManager->download() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:155
Composer\Installer\LibraryInstaller->installCode() at phar:///usr/local/bin/composer/src/Composer/Installer/LibraryInstaller.php:86
Composer\Installer\LibraryInstaller->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:151
Composer\Installer\InstallationManager->install() at phar:///usr/local/bin/composer/src/Composer/Installer/InstallationManager.php:138
Composer\Installer\InstallationManager->execute() at phar:///usr/local/bin/composer/src/Composer/Installer.php:505
Composer\Installer->doInstall() at phar:///usr/local/bin/composer/src/Composer/Installer.php:208
Composer\Installer->run() at phar:///usr/local/bin/composer/src/Composer/Command/CreateProjectCommand.php:235
Composer\Command\CreateProjectCommand->installProject() at phar:///usr/local/bin/composer/src/Composer/Command/CreateProjectCommand.php:131
Composer\Command\CreateProjectCommand->execute() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:244
Symfony\Component\Console\Command\Command->run() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:882
Symfony\Component\Console\Application->doRunCommand() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:212
Symfony\Component\Console\Application->doRun() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:117
Composer\Console\Application->doRun() at phar:///usr/local/bin/composer/vendor/symfony/console/Symfony/Component/Console/Application.php:119
Symfony\Component\Console\Application->run() at phar:///usr/local/bin/composer/src/Composer/Console/Application.php:83
Composer\Console\Application->run() at phar:///usr/local/bin/composer/bin/composer:43
require() at /usr/local/bin/composer:15

to advance and test I have done a classical install with a tarball

Avatar
purplespider

Community Member, 82 Posts

29 May 2013 at 5:16am

I just changed both occurrences of "sapphire" to "silverstripe-framework" in the .lock file, and it seemed to work perfectly fine. Presume it will need to be redone when updated, but hopefully Github will have fixed the redirect by then.

Avatar
Martin D.

Community Member, 21 Posts

10 July 2013 at 6:49am

This is still a problem with 3.0.5

@purplespider: Could you explain in more detail how you got composer to install properly?

Go to Top