简体   繁体   English

Linux 用户在从 TFS 2015.2.1 更新到 TFS2017 后推送到 git repo 时得到 401

[英]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.最近从 TFS 2015.2.1 更新到 TFS 2017 后,我的 Linux 用户无法推送到他们的 git 存储库。 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 `错误:请求的 URL 返回错误:401 访问http://xyz@abc.def.net:8080/tfs/Orion/_git/poller.cli-collector/info/refs

fatal: HTTP request failed `致命:HTTP 请求失败`

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.该问题似乎与从 Linux 机器访问有关,因为在 Windows 机器上使用 git 客户端(VisualStudio、SourceTree、Eclipse)推送更改没有问题。

We are a small team, so TFS is setup on a single server machine (ie SQL Server for the TFS data tier and TFS application tier are running on the same machine) running Windows Server 2012 R2 Standard.我们是一个小团队,因此 TFS 设置在一台运行 Windows Server 2012 R2 Standard 的服务器机器上(即 TFS 数据层的 SQL Server 和 TFS 应用程序层运行在同一台机器上)。

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.在更新过程之后的配置步骤中,当要求绑定配置(http 或 https)时,我选择了“自定义”,我希望这是不更改以前配置的选择。 SSH access is enabled even though we currently don't use it.即使我们目前不使用 SSH 访问,它也已启用。

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.您可能在 TFS 2015 上启用了基本身份验证,这是为了允许不使用 Windows 身份验证的人针对 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.您可以(并且应该)使用个人访问令牌而不是启用基本身份验证,因为基本身份验证以明文形式传输凭据,除非您的服务器设置为 HTTPS。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM