Fredrik Hultin edited a comment on Bug JENKINS-21401

The problem is that the Team Foundation server uses Microsoft's NTLM authentication rather than Basic HTTP Authentication or digest (as the bug title states). The UsernamePasswordCredentials object that the git-client plugin produces for the HTTP request, however, is incompatible with NTLM, which is why an exception is thrown.

To fix this issue an NTCredentials object should be generated instead.

I've hacked together a quick fix that temporarily solves the problem, at least for me. It basically checks if the URI path starts with "/tfs". If it does, it replaces the defaultcreds variable with the corresponding NTCredentials object.

A proper fix would obviously rather query the HTTP server and ask what type of authentication it uses, and use that information to generate the proper credentials object.

In the meantime, this fix might help some people so I'm including it.

DISCLAIMER: I've only tested this with .netrc credentials, in Linux, against a Team Foundation Server 2013. For me, it worked even though I left the domain blank, but perhaps it's needed in other cases. (It's the last parameter for the NTCredentials constructor if someone needs to add it).

Gist with the patch: https://gist.github.com/noname22/8807368

The actual source code being patched is from the master branch of the git-client-plugin:
https://github.com/jenkinsci/git-client-plugin

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to