8

I keep on getting the following error message from eclipse when I try to push my android code to my remote Git repository in Bitbucket.

Cannot run program "C:\Users\John\.ssh": CreateProcess error=5, Access is denied

I have already performed a successful push once to the remote repository of my entire android project via:

ssh://git@bitbucket.org/myname/myproject.git

I have also exchanged public keys between the android and the Bitbucket account. Both eclipse id_rsa public and private keys are stored under my C:/Users/John/.ssh folder

I have also set the environmental variable GIT_SSH=C:/Users/John/.ssh

Now every time I try to push to the remote repository eclipse complains with this error.

My eclipse is Android Developer Tools running on Windows 8.1.

I appreciate any support from the community.

goseib
  • 737
  • 3
  • 12
  • 24

3 Answers3

31

I found that the path in Android Studio (File-Settings-Version Control->Git->Path to Git) requires not just the path where Git.exe is, but also needs to include the file name git.exe at the end of the path. When I included that this error goes. Hope this helps. You can test it with the Test button next to the path and browse buttons.

Anand
  • 476
  • 6
  • 10
8

Yes absolutely !

This is the faulty one:

C:\Users\Zozo07\AppData\Local\GitHub\PortableGit_d76a6a98c9315931ec4927243517bc09e9b731a0\cmd

C:\Users\Zozo07\AppData\Local\GitHub\PortableGit_d76a6a98c9315931ec4927243517bc09e9b731a0\cmd\git.exe

The \git.exe at the end has solved my problem !

Itban Saeed
  • 1,660
  • 5
  • 25
  • 38
Zoltan Suto
  • 81
  • 1
  • 4
0

Go to File-> Settings-> Version Control -> Git and in the text box "Path to Git Executable " give the path to the git.exe file. eg: E:\Program Files\Git\bin\git.exe. Then click the test button. If the path is correct it will pop up a dialog box with the details about the installed git version.

udi
  • 3,672
  • 2
  • 12
  • 33