Git: Installing Git SDK: Instructions do not work

Created on 23 Jul 2019  路  5Comments  路  Source: git-for-windows/git

  • [ ] I was not able to find an open or closed issue matching what I'm seeing

Setup

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?

    1. I'm on a 64bit machine, but I read somewhere that something didn't work right on 64bit so 32bit must be used. Unfortunately, I don't remember what.

My purpose is to get rsync. I already have Git Bash for Windows. Sadly, that's not enough. Evidentally, I need to install Git SDK so I can add rsync and other functionality.

$ git --version --build-options

(I've *already installed* Git Bash, it's git version 2.18.0.windows.1. But that is irrelevant.)
I'm _trying_ to install the latest Git SDK. But I cannot get that far.
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
    Windows 10 Pro 64-bit.
$ cmd.exe /c ver

Microsoft Windows [Version 10.0.17134.829]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
# One of the following:
> type "C:\Program Files\Git\etc\install-options.txt"
> type "C:\Program Files (x86)\Git\etc\install-options.txt"
> type "%USERPROFILE%\AppData\Local\Programs\Git\etc\install-options.txt"
$ cat /etc/install-options.txt

None of the above.  I Right-Clicked on `git-sdk-installer-1.0.7-32.7z.exe` -> run as Administrator, as per [instructions](https://github.com/git-for-windows/git/wiki/Technical-overview#hacking-on-git).  I chose the default install folder `C:\git-sdk-32`.

As per instructions, this is supposed to  
> [...run it (using "Run as Administrator").] 
> You will end up with a console window running the Git for Windows SDK shell...

Unfortunately, no such environment opens.  At best I find a batch file `C:\git-sdk-32\setup-git-sdk.bat` that *might* do this??? But I cannot run it as administrator.  In fact, all it does is open up in a text editor :-(
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

* insert your response here *

Details

  • Which terminal/shell are you running Git from? e.g Bash/CMD/PowerShell/other

I usually use Git Bash. But that is unrelated to this issue. I cannot even get the Git SDK up and running. Again my purpose is to gain access to rsync. I dunno even how this Git SDK is going to interfere with my current (soon to be previous?) git install. I'm guessing I'll need to uninstall, or at least ignore the previous install.. Dunnot about any settings that I previously had thogh. How do I transport them over to this new installation.

As per [instructions](https://github.com/git-for-windows/git/wiki/Technical-overview#hacking-on-git).  
I Right-Clicked on `git-sdk-installer-1.0.7-32.7z.exe` -> run as Administrator.  
I chose the default install folder `C:\git-sdk-32`.

  • What did you expect to occur after running these commands?

As per instructions, this is supposed to

[...run it (using "Run as Administrator").]
You will end up with a console window running the Git for Windows SDK shell...

  • What actually happened instead?

Unfortunately, no such environment opens. It looks like some files are unzipped maybe, or installed, though I did not see an install window, except the one asking where I'd like it installed.
Nothing opened up afterwards.
At best I find a batch file C:\git-sdk-32\setup-git-sdk.bat that I considered might do what the instructions suggested. But No. Also, I cannot run the .bat file as administrator - right-clicking gives me no option to do so.. In fact, all that clicking the file does, is open up the bat file in a text editor :-(

  • If the problem was occurring with a specific repository, can you provide the
    URL to that repository to help us with testing?

* insert URL here *
https://github.com/git-for-windows/build-extra/releases/tag/git-sdk-1.0.7

To be honest, for someone like me, who simply wants to add, say rsync capability, neither the instructions, nor other web pages, provide enough context to really know how to accomplish our task. At best we can try to follow the instructions, hoping that clarity magically appears as we run the commands. Or somehow, after install, everything just works, including the ability to use an rsync command. Adding a bit more info for those of us ont quite familiar with this ecosphere, would be appreciated.
Or just instructions that work. Maybe the instrucions just need to spell out a step more clearly for the rest of us? I've been trying for 2 days to get rsync on my machine in some way. But no methods on ServerFault, StakcOverflow, blogs, etc seems to provide instructions that work. Git bash does not have permissions to run the rsync...xz file, nor can I change permissions on the file with chmod 777. cygwin - I don't even get what that's all about, seems really complicated. So I thought Git SDK would be the most reliable and safest way to go. But, then, here I am. Confused. Stuck again.

Most helpful comment

This sounds like you associated the bat extension with an editor. Please check that. If so, that breaks many scripts, not just those used by git.

All 5 comments

This sounds like you associated the bat extension with an editor. Please check that. If so, that breaks many scripts, not just those used by git.

So the instructions say that running the .exe file as administrator will

You will end up with a console window running the Git for Windows SDK shell...

This did not happen.

What did work for me, since I already had Git Bash installed, was going to:
Start -> All Programs -> Git -> Right-Click on Git CMD -> Run as Administrator
(I might have first tried Git Bash and it did not work, or for some other reason I presumed it would not work, so chose Git CMD instead).
Then I changed to the git-sdk-32 was installed (cd ..\..) and ran the bat file" setup-git-sdk.bat.
This then did the install and opened up the promised Git Bash for Windows SDK shell window. :-)

The reason I chose to use Git CMD instead of Run -> cmd is because I did not know how to invoke it to be run As Administrator. And I presumed I would need to run it as administrator.
What I'm saying is there may be an easier, more efficient way, to accomplish the same thing.

I wanted to suggest adding similar (alternate) instructions for others who encountered similar behavior, and got stuck as I did.

@mfriedrich74 Thanks! You are correct. I found the solution to fix the .bat association on StackOverflow here, and a related fix on SuperUser here. Now my .bat files seem to be properly associated. At least right-clicking on one now gives me an option to 'Run As Administrator' !! Thank you so much. :-)

Basically, open a cmd or git bash window, and type assoc .bat=batfile. It might be a good idea to also type asoc .cmd=batfile. Prior to this they were both associated as Notepad++_file.

I expect with this fix, the instructions would act just as expected. Thank you for identifying the problem so I do not run into similar issues in the future !!

I am glad you figured it out!

FWIW the Git for Windows SDK installer is _not_ supposed to be run as administrator...

Basically, open a cmd or git bash window, and type assoc .bat=batfile. It might be a good idea to also type asoc .cmd=batfile. Prior to this they were both associated as Notepad++_file.

These associations should be the default, I think... At least it worked for me on all of my machines without making that file extension association first...

Was this page helpful?
0 / 5 - 0 ratings