My repository is on Bitbucket. I have a Ubuntu machine that I use as a development server (which hosts a local copy of all my code, apache, php, git etc). The actual development is done on a Windows machine in the same LAN. I use a Samba share to access the files on the server directly.
I use PHPStorm as my IDE. I installed git on the Windows machine as well, in order to use git integration in PHPStorm. And it works: I can read the repository history and commit new changes withouth problem.
But now I want to push (to bitbucket) from PHPStorm as well. And that is what fails.
Right now, I need to login to my Ubuntu server to push code from there. But I'd like to be able to psuh from PHPStorm. It has probably to do with ssh-keys I need to integrate, but I don't know how. PHPStorm tells me the following:
19:22:10.873: git push --progress origin master:master
java.io.IOException: Authentication failed:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
The PhpStorm git Integration man page does mention:
- ssh keys are generated outside PhpStorm. You can follow the instructions from http://inchoo.net/tools/how-to-generate-ssh-keys-for-git-authorization/ or look for other guidelines.
- Store the ssh keys in the home_directory
\.ssh\folder. The location of the home directory is defined through environmental variables:
$HOMEfor Unix-like operating systems.
%userprofile%for the Microsoft Windows operating system.
- Make sure, the keys are stored in files with correct names:
id_rsafor the private key.
id_rsa.pubfor the public key.