Reputation: 1209
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"
}
]
}
When I run composer install from the command line I get:
[RuntimeException] Failed to execute git clone --mirror "[email protected]: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.
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:
git clone --mirror "[email protected]:username/repo.git"
I do get ask for my passphrase and after that it start cloning the Repo.
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?
Upvotes: 5
Views: 13401
Reputation: 1
Having faced the same issue as described by OP, I too tried to follow the instructions on Why git can't remember my passphrase under Windows
But I limited my steps to these:
Access Windows' environment variables dialog (Right-click on "Computer", Click on "Properties", Click on "Advanced system settings" or the "Advanced" tab, click on "Environment Variables"). Add the following environment variable:
GIT_SSH=C:\full\path\to\plink.exe
After the restarting the command line tool (important to have the new env variables take effect) it worked.
Upvotes: 0
Reputation: 461
I had the same problem and answer from this post helped me Why git can't remember my passphrase under Windows
All I did was to run 'start-ssh-agent' in CMD and provide password.
Third solution Assumes Window, msysgit, and native command prompt.
Install msysgit
Make sure to allow git to be used on the MS-DOS
command prompt Run start-ssh-agent
Enter SSH passphrases
All done! Git commands should now work in the native command prompt.
Upvotes: 12
Reputation: 57683
Open Pageant to view loaded keys. If your key is not in the list click Add Key
.
ssh -T [email protected]
Upvotes: 4