使用 Satis 搭建私有仓库
作者:admin 发布时间:December 26, 2022 分类:Linux No Comments
1 安装
git clone https://github.com/composer/satis
cd satis
composer install
2 建立配置文件
在 /data/satis 目录下建立 satis.json 文件
{
"name": "当前仓库",
"homepage": "http://仓库地址",
"repositories": [
{ "type": "vcs", "url": "ssh://项目git地址" }
],
"require-all": true
}
3 生成仓库列表
php bin/satis build satis.json ./public
4 之后再编辑项目composer.json指定会使用的仓库地址,再通过 composer require 或者 composer install 想要的仓库就可以了。
"repositories": [
{
"type": "composer",
"url": "http://package.range8.cn"
}
],