I have a private project hosted on Bit Bucket. I have an SSH key setup. Is there a way I can use the php composer create-project vendor/name path
command in the same way as If it was on Packagist?
I have a private project hosted on Bit Bucket. I have an SSH key setup. Is there a way I can use the php composer create-project vendor/name path
command in the same way as If it was on Packagist?
Well there are different ways to accomplish this one being the use of a composer repository that is used instead of packagist.org, which is a better more centralized way to manage your private composer packages. The other method is to use a composer.json that incorporates your private repos within your environments, per environment.
Composer allows you to use private repositories to create projects.
Like so...
composer create-project vendor/name path --repository-url=http://repo.yourcomposerrepo.com
因为你不会向packagist提交私有软件包.这个url至少需要一个packages.json文件,如果你想要一个更动态的包解决方案,你可以使用satis或你自己的packagist.json.
The method for using composer.json applies to already created projects that will use custom repositories for private packages, not for creating new projects from private repositories. Use the next method if you want to go down a similar route.
为您的环境全局地将您的私有存储库配置到您的config.json中.那就像往常一样...
composer create-project vendor/name path