composer使用gitlab搭建私有库

{
"repositories": [
{
"type": "vcs",  // 使用gitlab固定
"url": "https://code.lrwanche.com/shiwh/sign.git"
}
],
"require": {
"yiche/sign": "v1.0"  //如果使用标签则直接标签名,如果是指定分支则dev-分支名,如dev-master
}
}

 

1.repositories修改源,这个最好放在最前面,因为composer是从上到下依次去拉取,首先从官方源,然后自己源

2.指定type:package

3.指定git分支版本,这个只能从小版本到大版本,不能从大版本到小版本,使用version指定

 

posted @ 2018-11-23 11:40  Sentiger  阅读(1432)  评论(0编辑  收藏  举报