我有一个私人仓库在BitBucket上,我正在尝试使用composer install在本地主机上安装,这是我的composer.json文件:
{
"repositories": [
{
"type": "git",
"url": "git@bitbucket.org:username/repo.git"
}
]
}
当我在命令行运行composer install时,会出现以下信息:
我的密钥有密码,但composer从未要求输入密码。我正在运行Windows 10,并且Pageant客户端正在运行并且已选择了正确的密钥。[RuntimeException] Failed to execute git clone --mirror "git@bitbucket.org:username/repo.git" "C:/Users/...../" Cloning into bare repository 'C:/Users/.....'... Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
此外,还有一个包含以下数据的配置文件:
Host bitbucket.org
IdentityFile ~/.ssh/openssh (yes my key name is openssh)
有趣的是,如果我复制并粘贴这个命令:
我会被要求输入我的密码,然后开始克隆存储库。git clone --mirror "git@bitbucket.org:username/repo.git"
问题可能出在哪里呢?大多数关于此错误的信息直接涉及git命令,但在我的情况下它们有效,不起作用的是composer。我做错了什么?