Using an ssh key with composer for a private vcs

拜拜、爱过 提交于 2019-12-04 19:37:09

You are using the ssh2 options where they don't belong. That key belongs inside the options key. E.g.:

{
  "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"
      }
    }
  }]
}

Located where they are, it's not a big surprise composer is simply ignoring those settings.

Still, I'm not sure this is going to do what you need to authenticate with bitbucket. If you have a private bitbucket repo, you should probably use the bitbucket driver:

{
    "config": {
        "bitbucket-oauth": {
            "bitbucket.org": {
                "consumer-key": "myKey", 
                "consumer-secret": "mySecret"
            }
        }

    }
} 
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!