Error connecting GitHub to RStudio

I’ve been trying to connect my GitHub repos to my RStudio and every time I try to do it, I keep getting an error of “%1 is not a valid Win32 application” from RStudio.

I’ve used an existing GitHub repo and copied the URL for the “Clone or Download” button. I then switched over to my RStudio and clicked on “New Project” and added version control with Git. I pasted the URL in the pop up window and it auto populates just fine. When I click “Create Project” the error of “%1 is not a valid Win32 application” pops up and RStudio is stuck trying to clone the repo but obviously cannot.

I have also used the SSH from RStudio to the web based GitHub and verified that my RStudio acknowledges my user email, name, and the SSH key connected to my GitHub.

This problem did not happen on my old laptop. My current laptop is running on Windows 10 64 bit and I’ve made sure to download GitHub, R, and RStudio as all 64 bit.

Any help or suggestions are appreciated. Thanks.

I see this is an old post, but did anybody find a solution this problem?
I am having the same issue

Hello axgardner,

A colleague of mine helped me figure out the issue. For me, I had the program pointing at the wrong path. To fix the issue I clicked the Tools drop down menu and selected Global Options. In the pop up menu, I clicked on the Git/SVN option. The Git executable should be something like “C:/Program Files/Git/cmd/git.exe”. Make sure it’s the cmd version. When I set up mine physically, I told RStudio to use the /bin/git.exe version and it obviously didn’t work.

So for brevity: Tools > Global Options > Git/SVN and click browse on the Git Executable to have it point to the “C:/Program Files/Git/cmd/git.exe”.

After that, you should be good to connect your RStudio to GitHub with the usual steps.

Hi, thanks for the solution i had the same problem too