Raji Raji - 1 year ago 184
Linux Question

TFS 2015 Linux Build Agent Configuration Throwing 401 error

I am trying to configure a Linux agent for TFS 2015 update 3. When it prompts for entering information for configuration, it gives 401 error:

Raj@Ubuntu123:~/Linux_agent$ node agent/vsoagent
Enter alternate username > domain\<username>
Enter alternate password >
Enter server url > http://<hostname:port>/tfs
Enter agent name > Agent1
Enter Pool name > Linux
Enter force basic (enter is false) >
Error starting the agent
Failed Request: Unauthorized(401) - http://<hostname:port>/tfs/_apis/connectionData

I have checked all access. Access looks fine. The user has access in admin group (checked Team Foundation Administration Console- User's name is present in "Administration Console Users") and also to the agent pool. As it was 401 error, I gave access to all the groups present in TFS to the user but still it gives this error.

I was able to configure the agent in another TFS machine (TFS 2015 update 2). I have cross verified access in both the machines. It looks same. What am I missing? Please help me resolve this.

Answer Source

Is your TFS server configured to accept Basic Authentication and does it have SSL enabled with a trusted certificate? This is an important prerequisite to use the Linux agents.

Given the URI you've posted and the fact that you're using domain\user, I highly suspect that neither is true.

The vso-agent repository explains how to configure the Linux agent as well as the TFS server. With the next major version of TFS the build agent will support NTLM, which will forego this requirement.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download