[JIRA] [git] (JENKINS-21401) NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013
Mark Waite closed JENKINS-21401 as Fixed NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013 Change By: Mark Waite (29/Aug/14 4:47 PM) Status: Resolved Closed 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/d/optout.
[JIRA] [git] (JENKINS-21401) NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013
Olivier Dagenais stopped work on JENKINS-21401 NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013 Change By: Olivier Dagenais (24/Feb/14 3:40 PM) Status: InProgress Open 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.
[JIRA] [git] (JENKINS-21401) NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013
Olivier Dagenais resolved JENKINS-21401 as Fixed NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013 The fix should be in the next release of git-client-plugin Change By: Olivier Dagenais (24/Feb/14 3:41 PM) Status: Open Resolved Assignee: OlivierDagenais NicolasDeLoof Resolution: Fixed 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.
[JIRA] [git] (JENKINS-21401) NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013
SCM/JIRA link daemon commented on JENKINS-21401 NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013 Code changed in jenkins User: Nicolas De loof Path: pom.xml src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java src/main/java/org/jenkinsci/plugins/gitclient/Netrc.java src/test/java/org/jenkinsci/plugins/gitclient/NetrcTest.java http://jenkins-ci.org/commit/git-client-plugin/6bc60c026f019c15d96d6d2e8e9d804300640413 Log: Merge pull request #116 from olivierdagenais/JENKINS-21401_UseNTCredentialsForTfsGit JENKINS-21401 Add support for NTLM authentication, such as TFS 2013 Git servers Compare: https://github.com/jenkinsci/git-client-plugin/compare/682b654eb2a8...6bc60c026f01 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.
[JIRA] [git] (JENKINS-21401) NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013
Olivier Dagenais commented on JENKINS-21401 NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013 Pull request #116 submitted. 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.
[JIRA] [git] (JENKINS-21401) NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013
Olivier Dagenais started work on JENKINS-21401 NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013 Change By: Olivier Dagenais (13/Feb/14 6:16 PM) Status: Open InProgress 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.
[JIRA] [git] (JENKINS-21401) NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013
Olivier Dagenais assigned JENKINS-21401 to Olivier Dagenais NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013 Change By: Olivier Dagenais (13/Feb/14 6:16 PM) Assignee: NicolasDeLoof OlivierDagenais 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.
[JIRA] [git] (JENKINS-21401) NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013
Fredrik Hultin commented on JENKINS-21401 NTLM authentication issue when using Git repository hosted on Team Foundation Server 2013 The problem is that the Team Foundation server uses Microsoft's NTLM authentication rather than Basic HTTP Authentication or digest. The UsernamePasswordCredentials object that the git-client plugin produces for the HTTP request 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). a/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java +++ b/src/main/java/org/jenkinsci/plugins/gitclient/CliGitAPIImpl.java @@ -29,6 +29,7 @@ import org.apache.commons.httpclient.UsernamePasswordCredentials; import org.apache.commons.httpclient.auth.AuthScope; import org.apache.commons.httpclient.contrib.ssl.EasySSLProtocolSocketFactory; import org.apache.commons.httpclient.methods.GetMethod; +import org.apache.commons.httpclient.NTCredentials; import org.apache.commons.httpclient.protocol.Protocol; import org.apache.commons.io.FileUtils; import org.apache.commons.lang.StringUtils; @@ -1576,6 +1577,15 @@ public class CliGitAPIImpl extends LegacyCompatibleGitAPIImpl { defaultcreds = Netrc.getInstance().getCredentials(u.getHost()); } if (defaultcreds != null) { +// Use NT credentials with team foundation addresses +if(u.getPath().startsWith("/tfs")) { +listener.getLogger().println("using NT credentials with repository: " + url); + +org.apache.commons.httpclient.UsernamePasswordCredentials up = +(org.apache.commons.httpclient.UsernamePasswordCredentials) defaultcreds; + +defaultcreds = new NTCredentials(up.getUserName(), up.getPassword(), u.getHost(), ""); +} client.getParams().setAuthenticationPreemptive(true); client.getState().setCredentials(AuthScope.ANY, defaultcreds); } 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.