Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Git LFS for all users on Windows #643

Closed
larsxschneider opened this issue Sep 7, 2015 · 15 comments
Closed

Install Git LFS for all users on Windows #643

larsxschneider opened this issue Sep 7, 2015 · 15 comments

Comments

@larsxschneider
Copy link
Member

It looks like as Git LFS is installed only per user on Windows. Could you add a install switch to make Git LFS available to all users on a system?

I am no Windows user, but with a little hint I might be able to create the appropriate PR.

/CC @joshvera

@technoweenie
Copy link
Contributor

We're working on a gui installer: #642

Now, i'm not sure how this will affect multiple users on the same computer. Both the current install.bat script and the gui uploader install stuff to c:\program files. So it should be available to everyone. We could try changing git lfs init to use --system instead of --global. Is that what you're asking about?

@larsxschneider
Copy link
Member Author

Great to hear you are working on a installer! I am no Windows expert, but I don't think you install into c:\program files. You are using %LOCALAPPDATA% which installs into C:\Users\<user-name>\AppData\Local. More info here. In addition I think we need to add the Git LFS to the system PATH.

@technoweenie
Copy link
Contributor

The installer attempts to detect common locations for Git. I figure if they have git setup, I can install git-lfs.exe next to it and not worry about the PATH.

@technoweenie
Copy link
Contributor

How's this work? https://github.com/github/git-lfs/releases/download/v0.6.0/git-lfs-windows-amd64-0.6.0.zip

EDIT: I re-zipped the files and updated the URL.

@larsxschneider
Copy link
Member Author

The installer worked for me! I also wait for feedback from my team members with more Windows experience 😄 !

One minor thing: I noticed that README.md and CHANGELOG.md have Unix line endings... consequently the files look weird if someone opens them on Windows using Notepad. 😱 😄

@technoweenie
Copy link
Contributor

I noticed that README.md and CHANGELOG.md have Unix line endings...

That sucks. I'm not going to change them in the repo. Git LFS contributors should be using some unix shell. I think "Git Bash" on Windows doesn't have this problem.

However, I think you're referring to the readme and changelog files that are included in the zips. I think we should at least fix those line endings. We could even convert the markdown to HTML...

@larsxschneider
Copy link
Member Author

Yes, I am referring to the zip file. BTW: Why do you zip up the content anyways? Why not just distributing the nsi installer exe file? Then the users can install it right away. Git for Windows does the same:
https://github.com/git-for-windows/git/releases/download/v2.5.2.windows.2/Git-2.5.2.2-64-bit.exe

@technoweenie
Copy link
Contributor

No good reason. I can try that next.

@davidbernard04
Copy link

@technoweenie, so what's the status of this issue? Because I'm trying to setup a Windows build agent with LFS support and I think having a git lfs install that use --system instead of --global would help a lot. Because the LFS hooks are installed from my account only, and does not affect all other accounts (like the one used by my build agent).

@technoweenie
Copy link
Contributor

@davidbernard04: Currently still an open issue without any PRs. However, it's just using git config. You can workaround it by using:

$ git config --system filter.lfs.required "true"
$ git config --system filter.lfs.clean "git-lfs clean %f"
$ git config --system filter.lfs.smudge "git-lfs smudge %f"

Also, I'd appreciate you starting new discussions in new issues, and not in an unrelated thread. Thanks!

@davidbernard04
Copy link

@technoweenie thanks a lot for the workaround! I thought this was related to the current thread, as "Install Git LFS for all users on Windows" applies for the "git lfs install" too no?

@technoweenie
Copy link
Contributor

It's more about the windows specific install process. This 3 month old thread was before there was any kind of git lfs installer gui for windows, and installation was a mess.

@davidbernard04
Copy link

@technoweenie, OK I see! Then I have a question about your current Windows installer, which installs git-lfs.exe under C:\Program Files (x86)\Git\bin alongside the other git binaries, but for some reason only C:\Program Files (x86)\Git\cmd is in the path "by default", which also contain a git.exe (don't know why).

In other words, even using your installer, I still have to manually update the PATH or copy the git-lfs.exe under the "cmd" folder.

@technoweenie
Copy link
Contributor

The installer goes with the most common settings. If your isn't setup like that, you'll have to put it in the right place and change the system path yourself. There is a PR for a new windows installer: #875. I don't use Windows, so I'm relying on help from windows developers to get the installer in decent shape.

@technoweenie
Copy link
Contributor

Things should be much better now with the current installer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants