【问题标题】:Composer not using key set through SSH agent forwardingComposer 不使用通过 SSH 代理转发的密钥集
【发布时间】:2017-05-08 23:04:58
【问题描述】:

我在我的 Vagrant 盒子上使用 SSH 代理转发。看起来设置正确,因为我可以在我的私有存储库上成功执行 git clone:

$ git clone git@github.com:myorganisation/myrepo.git

Cloning into 'myrepo'...

我的 composer.json 中也有这个存储库:

{
    "type": "vcs",
    "url":  "git@github.com:myorganisation/myrepo.git"
},

但是,当我在同一用户下运行 composer update 时,我收到一条错误消息,表明我未经身份验证:

The "https://api.github.com/repos/com:myorganisation/myrepo" file could not be downloaded (HTTP/1.1 404 Not Found)

如何指示 Composer 使用我的转发密钥?

【问题讨论】:

    标签: ssh vagrant composer-php ssh-agent


    【解决方案1】:

    我通过添加no-api 选项对此进行了排序:

    {
        "type": "vcs",
        "no-api": true,
        "url":  "git@github.com:myorganisation/myrepo.git"
    }
    

    【讨论】:

      猜你喜欢
      • 2021-09-09
      • 2014-04-29
      • 2012-08-10
      • 1970-01-01
      • 1970-01-01
      • 2019-10-09
      • 1970-01-01
      • 1970-01-01
      • 2017-08-03
      相关资源
      最近更新 更多