Gitlab私有仓库通过composer [英] Gitlab private repository via composer

查看:23
本文介绍了Gitlab私有仓库通过composer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天我在 gitlab 中创建了私有存储库,并想在我的 laravel 项目中通过 composer 安装它,但是当我运行 composer update 时出现以下错误

Today I have created private repository in gitlab and want to install it via composer in my laravel project, but when I run composer update I am getting the following error

您的配置不允许连接到............

Your configuration does not allow connections to ...........

这是我的 composer.json

"repositories": [{
        "type": "package",
        "package": {
            "name": "abc/def",
            "version": "dev-master",
            "type": "package",
            "source": {
                "url": "http://gitlab.abc.pro/abc/def",
                "type": "git",
                "reference": "master"
            },
        }
    } ],
"require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.1.*",
        "abc/def" : "dev-master",  
    },

推荐答案

你可以使用:

"repositories": [
    {
     "type": "vcs",
      "url": "ssh://git@gitlab.yourdomain.com/repo/private.git"
    }
]

还有这个:

"require": {
    "php": ">=7.0.0",
    "repo/private": "dev-master",
 }

这篇关于Gitlab私有仓库通过composer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆