本文介绍了作曲者权限被拒绝(公钥)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在BitBucket上有一个私人仓库,我试图使用composer install在localhost上安装,这是我的composer.json文件:

I Have a private repo on BitBucket, Im trying to install on localhost using composer install, here is my composer.json file:

{
"repositories": [
    {
        "type": "git",
        "url":  "[email protected]:username/repo.git"
    }
]
}

从命令行运行composer install时,我得到:

When I run composer install from the command line I get:

我的密钥对有一个密码短语,但作曲家从未要求过它,我正在运行Windows 10,同时运行了Pageant客户端并选择了正确的密钥.

My key pair has an passphrase but composer never asks for it, I am running windows 10 with the Pageant client running and the correct key selected.

还有一个配置文件,其中包含以下数据:

Also there is a config file with this data:

Host bitbucket.org
IdentityFile ~/.ssh/openssh (yes my key name is openssh)

有趣的是,如果我复制并粘贴以下命令:

The funny thing is that if I copy and paste this command:

我确实要求我输入密码,然后它开始克隆存储库.

I do get ask for my passphrase and after that it start cloning the Repo.

可能是什么问题?有关此错误的大多数信息都直接针对git命令,但就我而言,它们起作用了,作曲家不起作用了,我在做什么错了?

What could be wrong? most information about this error refers directly for git commands, but in my case they work, what is not working is composer, what am i doing wrong?

推荐答案

我遇到了同样的问题,这篇文章的回答对我有所帮助为什么git无法在Windows下记住我的密码

I had the same problem and answer from this post helped meWhy git can't remember my passphrase under Windows

我所做的就是在CMD中运行"start-ssh-agent"并提供密码.

All I did was to run 'start-ssh-agent' in CMD and provide password.

安装msysgit

确保允许在MS-DOS上使用git

Make sure to allow git to be used on the MS-DOS

命令提示符运行start-ssh-agent

command prompt Run start-ssh-agent

输入SSH密码

全部完成!吉特命令现在应该可以在本机命令提示符下工作.

All done! Gitcommands should now work in the native command prompt.

这篇关于作曲者权限被拒绝(公钥)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-29 15:19