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.

First

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.

Second

为您的环境全局地将您的私有存储库配置到您的config.json中.那就像往常一样...

composer create-project vendor/name path

Laravel相关问答推荐

Hostinger Laravel网站未显示错误

Livewire 3分页在点击后不更新页面

我应该如何使用遵循依赖反转原则的工厂方法设计模式

按回车键时如何防止此功能运行?

Laravel Eloquent:组合列(或自定义属性)上的 Where 子句

为什么命令php artisan serve不起作用

Laravel Blade:@stop VS @show VS @endsection VS @append

从 Laravel Session 数组中删除项目

安卓 retrofit |发布自定义对象(将 json 发送到服务器)

找不到列:1054字段列表中的未知列0-Laravel-我的代码中的任何地方都没有0列

如何在没有 Eloquent 的情况下创建 Laravel 模型?

laravel 4 - 如何限制(采取和跳过)Eloquent的 ORM?

Laravel 4 上传图片表单

日期验证 - 如何本地化/翻译字符串今天和明天

如何使用 Laravel 测试授权重定向?

Laravel 4:将什么作为参数传递给 Url 类?

Laravel 检测手机/平板电脑并加载正确的视图

[Vue 警告]:找不到元素:#app

以编程方式而不是从 CLI 运行 Laravel 5 seeder

有没有办法让表名自动添加到 Eloquent 查询方法中?