1

我的 composer.json 文件中包含“私有”本地 svn 存储库的包。每个源 url 都包含 svn 用户名和密码。

随着项目部署在不同的服务器上,我不希望 svn 登录凭据以纯文本形式提供。

还有另一种方法可以做到这一点吗?我不介意每次运行更新时都必须输入登录详细信息。

下面是 composer.json 文件的示例:

{
"repositories": [
{
    "type": "package",
    "package": {
        "name": "localpackage/localpackage1",
        "version": "0.0.1",
        "source": {
            "url": "http://<username>:<password>@<ip_address>/local-package1/tags/",
            "trunk-path": "trunk",
            "branches-path": "branches",
            "tags-path": "tags",
            "type": "svn",
            "reference": "0.0.1"
        }
    }

},
{
    "type": "package",
    "package": {
        "name": "localpackage/localpackage2",
        "version": "0.0.1",
        "source": {
            "url": "http://<username>:<password>@<ip_address>/local-package2/tags/"
            "trunk-path": "trunk",
            "branches-path": "branches",
            "tags-path": "tags",
            "type": "svn",
            "reference": "0.0.1"
        }
    }

},
],
"require": {
    "localpackage/localpackage1" : "0.0.1",
    "localpackage/localpackage2" : "0.0.1"
}
]
}
4

1 回答 1

0

如果您没有指定它,composer 应该在安装/更新时提示您输入密码。

于 2013-03-24T11:23:38.707 回答