我的compsoser.json使用来自我们的组织Github帐户的2个私有存储库,如下所示.
{
"name": "API",
"repositories": [
{
"type": "vcs",
"url": "git@github.com/company/private.git"
},
{
"type": "vcs",
"url": "git@github.com/company/private2.git"
}
],
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": ">2.1.3",
"doctrine/mongodb-odm": "dev-master",
"doctrine/doctrine-mongo-odm-module": "dev-master",
"company/private": "dev-master",
"company/private2": "dev-master"
}
}
Run Code Online (Sandbox Code Playgroud)
我们设置了SSH密钥并将它们添加到我们的登台服务器上的授权密钥.当我们运行git clone时,它工作得很好,而不是要求任何凭据.
但是,当我们运行composer update时,获取存储库会失败,因为composer无法访问存储库.
由于这是以非交互方式运行的,因为这是构建脚本的一部分,因此我们无法输入凭据并希望将其自动化.
我们可以做些什么来让作曲家在构建过程中访问我们的私人回购?
我目前有这个 JS 数组,我想将其转换为 YAML 文件。我尝试查找内容,我知道如何创建对象和数组,但不知道如何嵌套它们。
cartParams: [
{
title: Leg type,
options: [
Round,
Square
]
},
{
title: Leg width / diameter,
options: [
1.00 inches,
1.25 inches,
1.50 inches,
1.75 inches,
2.00 inches
]
}
]
Run Code Online (Sandbox Code Playgroud)