Repository navigation
Closed as not planned
Closed as not planned
Copy link
Description
This post contains all the details -
https://stackoverflow.com/questions/53054297/cannot-push-to-server-with-git-lfs
Enabling git trace outputs the following:
16:06:24.410492 trace git-lfs: HTTP: POST http://tfsserver.xyz.com:8080/tfs/defaultcollection/code/_git/xyz.git/info/lfs/objects/batch
16:06:24.423530 trace git-lfs: HTTP: 200
16:06:24.423530 trace git-lfs: HTTP: {"objects":[{"oid":"a081dde9b4f42e7f9e185d4b05cf61e050d202f460a69fe77a6aa334e32afbf7","size":216552,"actions":{"upload":{"href":"http://tfsserver:8080/tfs/DefaultCollection/code/_git/xyz/info/lfs/objects/a081dde9b4f42e7f9e185d4b05cf61e050d202f460a69fe77a6aa334e32afbf7","header":{"Accept":"application/vnd.git-lfs","Transfer-Encoding":"chunked"}}}},{"oid":"9856362d92389afdb03113d489596be5ac80dfff2a0a57ff415aa60316940c55","size":216376,"actions":{"upload":{"href":"http://tfsserver:8080/tfs/DefaultCollection/code/_git/xyz/info/lfs/objects/9856362d92389afdb03113d489596be5ac80dfff2a0a57ff415aa60316940c55","header":{"Accept":"application/vnd.git-lfs","Transfer-Encoding":"chunked"}}}},{"oid":"f97a37cbcb6305dfce72b2a6acc3459306ed71a8e12549d51d7aadfa5af5fc32","size":101344,"actions":{"upload":{"href":"http://tfsserver:8080/tfs/DefaultCollection/code/_git/xyz/info/lfs/objects/f97a37cbcb6305dfce72b2a6acc3459306ed71a8e12549d51d7aadfa5af5fc32","header":{"Accept":"application/vnd.git-lfs","Transfer-Encoding":"chunked"}}}}]}
16:06:24.426495 trace git-lfs: tq: starting transfer adapter "basic"
16:06:24.427495 trace git-lfs: creds: git credential cache ("http", "tfsserver.xyz.com:8080", "")
16:06:24.428496 trace git-lfs: HTTP: PUT http://tfsserver:8080/tfs/DefaultCollection/code/_git/xyz/info/lfs/objects/a081dde9b4f42e7f9e185d4b05cf61e050d202f460a69fe77a6aa334e32afbf7
16:06:24.437001 trace git-lfs: HTTP: 401
16:06:24.442005 trace git-lfs: tq: refusing to retry "a081dde9b4f42e7f9e185d4b05cf61e050d202f460a69fe77a6aa334e32afbf7", too many retries (8)
16:06:24.442005 trace git-lfs: creds: git credential cache ("http", "tfsserver.xyz.com:8080", "")
16:06:24.443506 trace git-lfs: HTTP: PUT http://tfsserver:8080/tfs/DefaultCollection/code/_git/xyz/info/lfs/objects/9856362d92389afdb03113d489596be5ac80dfff2a0a57ff415aa60316940c55
16:06:24.450012 trace git-lfs: HTTP: 401
16:06:24.450511 trace git-lfs: HTTP: PUT http://tfsserver:8080/tfs/DefaultCollection/code/_git/xyz/info/lfs/objects/9856362d92389afdb03113d489596be5ac80dfff2a0a57ff415aa60316940c55
16:06:24.457516 trace git-lfs: HTTP: 401
16:06:24.457516 trace git-lfs: HTTP: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Not Authorized</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Not Authorized</h2>
<hr><p>HTTP Error 401. The requested resource requires user authentication.</p>
</BODY></HTML>
16:06:24.459017 trace git-lfs: tq: refusing to retry "9856362d92389afdb03113d489596be5ac80dfff2a0a57ff415aa60316940c55", too many retries (8)
16:06:24.459017 trace git-lfs: creds: git credential cache ("http", "tfsserver.xyz.com:8080", "")
16:06:24.461018 trace git-lfs: HTTP: PUT http://tfsserver:8080/tfs/DefaultCollection/code/_git/xyz/info/lfs/objects/f97a37cbcb6305dfce72b2a6acc3459306ed71a8e12549d51d7aadfa5af5fc32
16:06:24.466023 trace git-lfs: HTTP: 401
16:06:24.466524 trace git-lfs: HTTP: PUT http://tfsserver:8080/tfs/DefaultCollection/code/_git/xyz/info/lfs/objects/f97a37cbcb6305dfce72b2a6acc3459306ed71a8e12549d51d7aadfa5af5fc32
16:06:24.471025 trace git-lfs: tq: refusing to retry "f97a37cbcb6305dfce72b2a6acc3459306ed71a8e12549d51d7aadfa5af5fc32", too many retries (8)
Uploading LFS objects: 0% (0/3), 8.4 MB | 0 B/s, done
LFS: seek D:\xyz\code\.git\lfs\objects\a0\81\a081dde9b4f42e7f9e185d4b05cf61e050d202f460a69fe77a6aa334e32afbf7: file already closed
LFS: seek D:\xyz\code\.git\lfs\objects\98\56\9856362d92389afdb03113d489596be5ac80dfff2a0a57ff415aa60316940c55: file already closed
LFS: Put http://tfsserver:8080/tfs/DefaultCollection/code/_git/xyz/info/lfs/objects/f97a37cbcb6305dfce72b2a6acc3459306ed71a8e12549d51d7aadfa5af5fc32: read D:\xyz\code\.git\lfs\objects\f9\7a\f97a37cbcb6305dfce72b2a6acc3459306ed71a8e12549d51d7aadfa5af5fc32: file already closed
error: failed to push some refs to 'http://tfsserver.xyz.com:8080/tfs/defaultcollection/code/_git/xyz/'
Reacted by Itamar Shoham
Metadata
Metadata
Assignees
Labels
No labels
Activity
bk2204 commentedon Oct 31, 2018
Hey, sorry you're having trouble. Let me see if I can help out.
It looks like you're using a credential helper, so can you run the following commands, and make sure they output the same credentials? As a note, they'll output plaintext passwords, so you may want to pipe them to
lessto avoid displaying them on your terminal.printf 'url=http://tfsserver:8080/\n' | git credential fillprintf 'url=http://tfsserver.xyz.com:8080\n' | git credential fillMarkKharitonov commentedon Nov 1, 2018
Thanks for the info. The guy was able to workaround the issue by connecting to the server without the domain name, so that there are no differences in the URLs.
I am still very interested to get to the bottom of it, but I need to wait until someone comes with this failure again. Can we keep this issue open on low fire until the opportunity arises to reproduce it?
bk2204 commentedon Nov 1, 2018
Sure, I don't see that being a problem. In general, if you can make your credential helper, whatever that might be, do the right thing, then this should resolve itself automatically.
MarkKharitonov commentedon Nov 2, 2018
It is confirmed. Another instance of the same problem. The credential fill returns the same result with domain or without.
The only difference is that I used the following commands:
This is because I am using Powershell, not bash. Does it matter?
bk2204 commentedon Nov 5, 2018
Can you tell me what version of Git LFS you're using and provide the output of
git lfs env?MarkKharitonov commentedon Nov 5, 2018
PS C:\git\xyz> git lfs env
git-lfs/2.5.2 (GitHub; windows amd64; go 1.10.3; git 8e3c5c9)
git version 2.17.1.windows.2
Endpoint=http://tfsserver:8080/tfs/defaultcollection/code/_git/xyz.git/info/lfs (auth=ntlm)
LocalWorkingDir=C:\git\xyz
LocalGitDir=C:\git\xyz.git
LocalGitStorageDir=C:\git\xyz.git
LocalMediaDir=C:\git\xyz.git\lfs\objects
LocalReferenceDirs=
TempDir=C:\git\xyz.git\lfs\tmp
ConcurrentTransfers=3
TusTransfers=false
BasicTransfersOnly=false
SkipDownloadErrors=false
FetchRecentAlways=false
FetchRecentRefsDays=7
FetchRecentCommitsDays=0
FetchRecentRefsIncludeRemotes=true
PruneOffsetDays=3
PruneVerifyRemoteAlways=false
PruneRemoteName=origin
LfsStorageDir=C:\git\xyz.git\lfs
AccessDownload=ntlm
AccessUpload=ntlm
DownloadTransfers=basic
UploadTransfers=basic
GIT_EXEC_PATH=C:/Program Files/Git/mingw64/libexec/git-core
GIT_LFS_PATH=C:\Program Files\Git LFS
git config filter.lfs.process = "git-lfs filter-process"
git config filter.lfs.smudge = "git-lfs smudge -- %f"
git config filter.lfs.clean = "git-lfs clean -- %f"
bk2204 commentedon Nov 5, 2018
Okay, I think this explains the situation. NTLM uses the server name in a challenge, so I believe the client and server need to agree on what that is. This appears to be a configuration issue with how your network is set up with authentication, so you'd probably need to talk to your networking folks about how to get things set up properly.
Alternatively, you could switch to Basic authentication if your TFS implementation knows how to proxy that to your Active Directory (or other authentication) server.
MarkKharitonov commentedon Nov 5, 2018
Do you know where this is managed? I am not an IT person and frankly cannot speak intelligently about NTLM.
bk2204 commentedon Nov 5, 2018
I'm very sorry, but I don't. I don't use Windows, NTLM, or Active Directory, either in my personal or professional life, so unfortunately I can't be of any help in this regard.
I just looked up the Microsoft NTLMv2 protocol specification, which is how I figured it out. I have very little knowledge of how NTLM actually works beyond having read the protocol docs.
nhatkhai commentedon Nov 8, 2018
I have similar issue with version 2.6.0, and 2.5.0. But it is working fine with version LFS 2.4.2.
And here is my lfs env for 2.4.2 (which is the working version)
bk2204 commentedon Nov 8, 2018
@nhatkhai I think what you're seeing is a different issue. You're seeing a 500 error with Basic authentication, whereas the original reporter is seeing a 401 with NTLM authentication. Could you open this as a separate issue, please?
[-]Unable to push[/-][+]Unable to push with different server hostnames and NTLM authentication[/+]bk2204 commentedon Jun 26, 2023
We no longer support NTLM authentication, so we won't be fixing this.