LFS: Git credentials for..XXXX..not found. Your user name must be of the form DOMAIN\user
Asked Answered
G

2

5

So we are trying to setup GIT LFS with on premises TFS and we are having a couple of errors. The errors and setup are described below:

Setup:

1) On-premises TFS 2017 w/Update 1

2) Visual Studio 2015 w/Update 3

3) Atlassian SourceTree (Git Client)

4) GIT LFS is installed on the developer's system

5) The Git Credential Manager for Windows (GCM)

Errors:

  1. Going to Tools->Options->[Git Tab] in SourceTree and selecting [Use System Git] and trying to checkout a version of the file from history results in the following error:

git-lfs/2.0.1 (GitHub; windows amd64; go 1.8; git 678cdbd4) git version 2.12.1.windows.1

$ git-lfs.exe filter-process Error downloading object: Framework4.dll (ef57f778c9fd50b27144784cd1df55b1b014d564ad6d8d726b156748219b8e5f)

Smudge error: Error downloading Framework4.dll (ef57f778c9fd50b27144784cd1df55b1b014d564ad6d8d726b156748219b8e5f): batch response: Your user name must be of the form DOMAIN\user. It is currently USR123

  1. Going to Tools->Options->[Git Tab] in SourceTree and selecting [Use Embedded Git] and trying to checkout a version of the file from history results in the following error:

git-lfs/1.5.2 (GitHub; windows 386; go 1.7.3; git 547a06aa) git version 2.10.2.windows.1

$ git-lfs.exe smudge -- Framework4.dll Error downloading object: Framework4.dll (ef57f778c9fd50b27144784cd1df55b1b014d564ad6d8d726b156748219b8e5f)

Smudge error: Error downloading ef57f778c9fd50b27144784cd1df55b1b014d564ad6d8d726b156748219b8e5f: LFS: Git credentials for http://localhost:8080/tfs/DefaultCollection/Common/_git/Common%20References not found.: LFS: Git credentials for http://localhost:8080/tfs/DefaultCollection/Common/_git/Common%20References not found.

What I have researched and tried:

  1. Folks recommended using "The Git Credential Manager for Windows (GCM)" to store and manage credentials. This was installed with the latest git version. But the errors still persists.

  2. Tried it without having installed "The Git Credential Manager for Windows (GCM)" still the error happens.

  3. Updated Git versions to the latest. Tried git-lfs/1.5.2 and git-lfs/2.0.1. But no go.

  4. Additional error info on the Environment:

ENV:

LocalWorkingDir=C:\Users\USR123\Documents\GitCloneTest\Common\References2 LocalGitDir=C:\Users\USR123\Documents\GitCloneTest\Common\References2.git LocalGitStorageDir=C:\Users\USR123\Documents\GitCloneTest\Common\References2.git LocalMediaDir=C:\Users\USR123\Documents\GitCloneTest\Common\References2.git\lfs\objects LocalReferenceDir= TempDir=C:\Users\USR123\Documents\GitCloneTest\Common\References2.git\lfs\tmp ConcurrentTransfers=1 TusTransfers=false BasicTransfersOnly=false BatchTransfer=true SkipDownloadErrors=false FetchRecentAlways=false FetchRecentRefsDays=7 FetchRecentCommitsDays=0 FetchRecentRefsIncludeRemotes=true PruneOffsetDays=3 PruneVerifyRemoteAlways=false PruneRemoteName=origin AccessDownload=ntlm AccessUpload=ntlm DownloadTransfers=basic UploadTransfers=basic GIT_CONFIG_PARAMETERS='color.branch=false' 'color.diff=false' 'color.status=false' 'diff.mnemonicprefix=false' 'core.quotepath=false' GIT_DIR=.git GIT_LFS_PATH=C:\Program Files\Git LFS GIT_PAGER=cat GIT_PREFIX=

Any ideas on how to fix the credential / authentication errors above?

Thank you.

Guaiacol answered 23/3, 2017 at 20:44 Comment(1)
Have you found a solution to get git-lfs working with an NTLM authenticated TFS server?Fundamental
S
11

This error comes from LFS extension if you have logged in to TFS without specifying domain name, and you are trying to push a large file. Go to Control Panel\User Accounts\Credential Manager, Windows Credentials tab and remove credentials stored for TFS server. When you git push again from command line, you will be prompted for your credentials. Specify your user name with the domain: DOMAIN\USER

Stefa answered 5/6, 2017 at 9:26 Comment(1)
For mac users, you can track this down in your Keychain and add the domain name. Sourcetree couldn't download my binary info using LFS, and as soon as I changed my creds and restarted Sourcetree it said hey, your binary info is missing. Let's download it.Felafel
F
0

Since version 2.4.0 Git-Lfs comes with NTLM support. With this you no longer need to use the basic authentication fallback by setting the credentials in the Windows Credential Manager and Git-Lfs should work out of the box with TFS on-prem.

Fundamental answered 3/3, 2018 at 10:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.