gpt4 book ai didi

composer-php - Gitlab私有(private)仓库通过composer

转载 作者:行者123 更新时间:2023-12-01 09:16:00 25 4
gpt4 key购买 nike

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

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",
}

关于composer-php - Gitlab私有(private)仓库通过composer,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44919675/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com