microsoft / vso-agent

Visual Studio Team Services and TFS agent for Mac OSX and Linux
MIT License
132 stars 57 forks source link

Authentication failed (required domain name) #258

Closed lboss75 closed 8 years ago

lboss75 commented 8 years ago

I have TFS 2015 installed in network with Active Directory. When I tring to build my code on Linux machine (CentOS) I have error:

fatal: Authentication failed for 'http://username:password@tfs/tfsserver/DefaultCollection/_git/project/' /usr/local/git/bin/git failed with return code: 128

The problem is user name: it is without domain name.

But if I specify domain name, tfs agent escapes domain name separator (@ or ) and I got error again:

fatal: Authentication failed for 'http://username%40**domain_name**:password@tfsserver/tfs/DefaultCollection/_git/project/'

In console command git clone http://username@domain_name:password@tfsserver/tfs/DefaultCollection/_git/project/

works Ok.

So:

  1. Can I tune TFS to accept only user name in the git?
  2. Can I turn out escaping in the user name for git?
bryanmacfarlane commented 8 years ago

Did you follow all the on-prem instructions?

https://github.com/Microsoft/vso-agent/blob/master/docs/onprem.md

ericsciple commented 8 years ago

Setting the "Default domain" for the Basic Authentication settings in IIS might workaround the issue.

lboss75 commented 8 years ago

Yes: I followed all the on-prem instructions. And yes: I set default domain in IIS.

lboss75 commented 8 years ago

I have solved it: Need to use NTLM authenfication in TFS.