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:
- 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
- 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:
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.
Tried it without having installed "The Git Credential Manager for Windows (GCM)" still the error happens.
Updated Git versions to the latest. Tried git-lfs/1.5.2 and git-lfs/2.0.1. But no go.
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.
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
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.
来源:https://stackoverflow.com/questions/42986608/lfs-git-credentials-for-xxxx-not-found-your-user-name-must-be-of-the-form-do