In anticipation of cold weather I decided to become an opensource contributor. I chose Yii2 project and read the doc.
The steps I have done: 1. create vhost with all necessary php-extensions 2. fork Yii2 repository and clone it on the host 3. add upstream, run composer and npm 4. php build/build dev/app advanced
After 4th step I got the error in console:
PHP Warning 'yii\base\ErrorException' with message 'chdir(): No such file or directory (errno 2)'
in /home/ghopper/Projects/yii2.test/build/controllers/DevController.php:178
It turned out that the script try to execute cd apps/advanced
but this folder doesn't exist. So, I created it by myself and it solve the problem.
I stumbled upon "Now you have a working playground for hacking on Yii 2." in the doc, but I think something wrong with my repo.
First of all, I have exactly the same directory structure as it is in original repo. There aren't frontend and backend directories. The second question is about apps/advanced
- where should I get it?
Update:
I specified the repo url and get new error:
ghopper@farm /var/www/yii2.test (master) $ php build/build dev/app advanced https://github.com/yiisoft/yii2-app-advanced.git
cloning application repo 'advanced' from 'https://github.com/yiisoft/yii2-app-advanced.git'...
Cloning into '/var/www/yii2.test/apps/advanced'...
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 6293 (delta 2), reused 4 (delta 2), pack-reused 6286
Receiving objects: 100% (6293/6293), 1.32 MiB | 204.00 KiB/s, done.
Resolving deltas: 100% (3389/3389), done.
Checking out files: 100% (270/270), done.
done.
cleaning up application 'advanced' vendor directory...
done.
updating composer for app 'advanced'...
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 66 installs, 0 updates, 0 removals
- Installing yiisoft/yii2-composer (dev-master f4cb50d): Downloading (100%)
- Installing sebastian/version (2.0.1): Downloading (100%)
- Installing sebastian/object-reflector (dev-master 7707193): Downloading (100%)
- Installing sebastian/recursion-context (dev-master dbe1869): Downloading (100%)
- Installing sebastian/object-enumerator (dev-master 06d95dc): Downloading (100%)
- Installing sebastian/global-state (dev-master 30367ea): Downloading (100%)
...
codeception/base suggests installing stecman/symfony-console-
completion (For BASH autocompletion)
codeception/base suggests installing symfony/phpunit-bridge (For phpunit-bridge support)
Writing lock file
Generating autoload files
done.
linking framework and extensions to 'advanced' app vendor dir...
Removing dir /var/www/yii2.test/apps/advanced/vendor/yiisoft/yii2.
Creating symlink for /var/www/yii2.test/apps/advanced/vendor/yiisoft/yii2.
Removing dir /var/www/yii2.test/apps/advanced/vendor/yiisoft/yii2-gii.
Creating symlink for /var/www/yii2.test/apps/advanced/vendor/yiisoft/yii2-gii.
cloning extension repo 'gii' from 'git@github.com:yiisoft/yii2-gii.git'...
Cloning into '/var/www/yii2.test/extensions/gii'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
done.
cleaning up extension 'gii' vendor directory...
done.
updating composer for extension 'gii'...
PHP Warning 'yii\base\ErrorException' with message 'chdir(): No such file or directory (errno 2)'
in /var/www/yii2.test/build/controllers/DevController.php:233
What does it mean git@github.com: Permission denied (publickey).
?