Composer won't install private package dependencies
You have to add repository entry to package sub-yyyy
in your main project as dependencies entry is not transitive.
From docs
Repositories are not resolved recursively. You can only add them to your main composer.json. Repository declarations of dependencies' composer.jsons are ignored.
Your composer.json
of main project should look like
{ "name": "main/project", "license": "proprietary", "type": "project", "prefer-stable": true, "repositories": [ { "type": "vcs", "url": "git@aaaaa.git" }, { "type": "vcs", "url": "git@xxxxx.git" }, { "type": "vcs", "url": "git@yyyyy.git" }, { "type": "vcs", "url": "git@sub-yyyy.git" } ]}