mhlas7
mhlas7

Reputation: 143

Eclipse Egit Cannot Run Program CreateProcess error=2

I am trying to import a GitHub repository into Eclipse and I keep getting the below error. Cannot run program "path" CreateProcess error=2, The system cannot find the file specified. The path has nothing to do with git and I can't figure out what program it needs to run or change where it looks for the program. I am using SSH with valid keys and I know my login information is correct.

Does anyone know what is causing this problem? I'm really stumped.

enter image description here

Upvotes: 1

Views: 2535

Answers (1)

mhlas7
mhlas7

Reputation: 143

I solved my own question. I used PuTTY to do my SSH authentication. Programs you will need, putty.exe, plink.exe, puttygen.exe, pagent.exe.

  1. My GIT_SSH path was invalid (*facepalm thanks robinst) so I set my GIT_SSH path to plink.exe. If you don't have a GIT_SSH environment variable, create one
  2. I then used puttygen.exe to generate an RSA key and saved the private key to my .ssh directory
  3. Start up pagent.exe and add the key you just saved
  4. Eclipse will now try to connect but it may give you an error that says "The server's host key is not cached in the registry. You have no guarantee that this is the computer you think it is." If this is the case, start up putty.exe, put in the Git repository URL and click connect. It will then ask you if you want to accept they key from this server. Click yes and then close out of putty.

You then should be able to connect to the Git repository. However you need to make sure that pagent is running and it has the key added otherwise this won't work. Check out this tutorial if you want pagent to load your keys when it starts.

Upvotes: 2

Related Questions