Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从Linux服务器执行GIT克隆时发生http 401.1错误_Linux_Git_Authentication_Tfs_Tfs Web Access - Fatal编程技术网

从Linux服务器执行GIT克隆时发生http 401.1错误

从Linux服务器执行GIT克隆时发生http 401.1错误,linux,git,authentication,tfs,tfs-web-access,Linux,Git,Authentication,Tfs,Tfs Web Access,我正在使用GIT团队项目运行TFS 2013。当我从一个本地Windows服务器执行git克隆时,我没有任何问题: -bash-4.1$ git clone "http://tfsadm:tfspas@tfs.server.com:8080/tfs/DefaultCollection/_git/Main" Initialized empty Git repository in /home/tfsadm/Mainframe/.git/ 但是,当我从Linux执行一个git克隆时,会出现以下错误:

我正在使用GIT团队项目运行TFS 2013。当我从一个本地Windows服务器执行
git克隆时,我没有任何问题:

-bash-4.1$ git clone "http://tfsadm:tfspas@tfs.server.com:8080/tfs/DefaultCollection/_git/Main"
Initialized empty Git repository in /home/tfsadm/Mainframe/.git/
但是,当我从Linux执行一个
git克隆时,会出现以下错误:

error: The requested URL returned error: 401 while accessing http://tfsadm:tfspas@tfs.server.com:8080/tfs/DefaultCollection/_git/Mainframe/info/refs fatal: HTTP request failed
错误:访问致命:HTTP请求失败时,请求的URL返回错误:401

这是一个经常重复出现的错误

发生这种情况的原因之一是,客户端无权访问该资源

一般解决方案是检查以下各项:

  • 你有稳定的git版本吗
  • 远程设备的配置是否正确
  • 如果启用了2FA,则提供访问令牌
  • 仔细检查您的权限(配置中的用户名/密码),或者尝试使用“”格式
  • 尝试ssh而不是https
  • 我不确定,但是你已经看到这个链接了吗? 它可以提供一些额外的信息