composer / satisf svn repository http基本身份验证

时间:2013-01-25 15:10:47

标签: authentication svn satis mod-dav-svn

我正在尝试使用satisf为我的公司创建一个composer包存储库。 我的svn存储库是通过http(apache svn)访问的。

我正在尝试将此添加到我的config.json中

{
    "name": "packages",
    "homepage": "http://packages.example.org",
    "repositories": [
        { "type": "svn",
          "url": "myrepourl" 
       }

    ],
    "require-all": true
}

问题在于我无法在存储库中进行身份验证:

Repository could  not be processed, svn: OPTIONS of  authorization failed. basic authentication rejected.

如何将用户名/密码传递给令人满意的?

谢谢

1 个答案:

答案 0 :(得分:0)

根据composer documentation,您必须将您的用户密钥文件或证书放入项目中,而不是在满意的配置中:

使用SSH:

{
    "repositories": [
        {
            "type": "composer",
            "url": "ssh2.sftp://example.org",
            "options": {
                "ssh2": {
                    "username": "composer",
                    "pubkey_file": "/home/composer/.ssh/id_rsa.pub",
                    "privkey_file": "/home/composer/.ssh/id_rsa"
                }
            }
        }
    ]
}

使用证书:

{
    "repositories": [
        {
            "type": "composer",
            "url": "https://example.org",
            "options": {
                "ssl": {
                    "cert_file": "/home/composer/.ssl/composer.pem",
                }
            }
        }
    ]
}