【发布时间】:2014-05-17 18:00:44
【问题描述】:
所以,我一直在使用 composer 来管理我的 git 存储库(在 bitbucket 上),现在,作曲家突然抱怨我无法访问我的存储库:S
我没有做任何特别的事情。但我继续使用 ssh-keygen 生成了一个新密钥,复制了公钥并将其添加到我的 bitbucket 帐户中。
于是我又试了sudo composer update,还是报错:
Failed to update git@bitbucket.org:afflicto/event.git, package information from this repository may be outdated (Agent admitted failure to sign using the key.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
error: Could not fetch origin
)
可能出了什么问题?
更新
我刚刚推送到我的一个 git 存储库,它工作正常。所以看起来 SSH 密钥设置正确,但 Composer 正在做一些奇怪的事情。
更新 2
似乎以sudo(即sudo composer update)运行composer update 不会使用你的 ssh 密钥...所以我想我必须将我的SSH 密钥添加到root 用户? :\
【问题讨论】:
标签: git ssh composer-php bitbucket