Skip to content

Git LFS on Windows requires credentials to be cached #1763

@BrodyB

Description

@BrodyB

Hey guys! If this is a known quirk / requirement already, please forgive this issue, but this took me countless hours to figure out and if it saves one person any time, I'll be happy.

When setting up new git users on Mac, I've been able to give them a Git client (GitHub Desktop, SourceTree) and Git LFS, then pull a fresh LFS repository. Git pulls the repo and then LFS takes over to get all the binary files. Setup is as easy as the instructions shown on the Git LFS page. Fast, simple, no fuss.

On Windows, however, Git LFS always, without fail, would give me problems when pulling a repo for the first time.

I would install a git client on the person's machine, let that handle the LFS install, pull a repo, and...it would hang. Tried installing a standalone git instance, standalone Git LFS, and try doing it all through bash. Running the git lfs fetch command would produce the following output:

Fetching master

and proceed to do nothing. git lfs pull would produce no output and do nothing. Both cases, I'd have to force close the bash instance and reopen it. Countless searches didn't give me any conclusive answers into what in Pete was making things so difficult, and I wasn't getting any error to tell me what was going wrong.

Finally, I saw some post mentioning storing your git credentials to keep git from having to ask for username/password constantly (which it wasn't, but what the heck). So in bash, I put in the following commands:

git config —global credential.helper wincred
git config —global credential.helper cache

This did it. Fetch/pull were now working reliably and as expected.

Things that would help smooth this situation out (especially for new or less tech-savvy users):

  1. Git LFS should check that it's not getting hung up from lacking credentials and provide feedback to the user
  2. The Git LFS site should list adding a credential helper to your git config if you're on Windows as part of setup. On Mac, this isn't happening.

Anyways, thanks so much for making LFS. It's made git so much nicer for game development projects!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions