Search code examples
gittfstfs-2015

Linux users get 401 when pushing to git repo after update from TFS 2015.2.1 to TFS2017


After a recent update from TFS 2015.2.1 to TFS 2017 my Linux users are unable to push to their git repos. Prior to the update there were no problems.

git push origin master

Results in a

`error: The requested URL returned error: 401 while accessing http://xyz@abc.def.net:8080/tfs/Orion/_git/poller.cli-collector/info/refs

fatal: HTTP request failed `

after entering the necessary user password.

The problem seems to be related to access from Linux machines, since pushing changes with git clients (VisualStudio, SourceTree, Eclipse) on Windows machines works without problems.

We are a small team, so TFS is setup on a single server machine (i.e. SQL Server for the TFS data tier and TFS application tier are running on the same machine) running Windows Server 2012 R2 Standard.

I tried to "Disable Loopback Check" on the server as described here but it didn't work.

In the configuration step after the update process, when asked for the binding configuration (http or https) I selected "Custom" which I hoped to be the choice to not change the previous configuration. SSH access is enabled even though we currently don't use it.


Solution

  • Chances are you had basic authentication enabled on TFS 2015, which was required in order to allow people not using Windows Authentication to authenticate against TFS. The upgrade very likely removed Basic Authentication.

    You can (and should) use Personal Access Tokens instead of enabling basic authentication, since basic authentication transmits credentials in plaintext unless your server is set up for HTTPS.