【问题标题】:http 401.1 error while performing a GIT clone from a Linux server从 Linux 服务器执行 GIT 克隆时出现 http 401.1 错误
【发布时间】:2015-01-27 15:56:51
【问题描述】:

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

-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 clone 时,我收到以下错误:

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

【问题讨论】:

    标签: linux git authentication tfs tfs-web-access


    【解决方案1】:

    错误:请求的 URL 返回错误:401 访问https://github.com/Joey-myproject/repo.git/info/refs 致命:HTTP 请求失败

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

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

    一般的解决方案是检查以下内容:

    1. 你有稳定的 git 版本吗?
    2. 远程配置是否正确?
    3. 如果启用了 2FA,则提供访问令牌。
    4. 仔细检查您的权限(配置中的用户名/密码)也许还尝试使用格式'https://username@mydomain.org/project.git''
    5. 尝试 ssh 而不是 https

    我不确定,但您是否已经看过此链接Can't clone a github repo on Linux via HTTPS? 它可以提供一些额外的信息。

    【讨论】:

      猜你喜欢
      • 2018-01-30
      • 2015-02-20
      • 2012-05-22
      • 1970-01-01
      • 1970-01-01
      • 2011-01-22
      • 2015-08-16
      • 1970-01-01
      • 2019-02-01
      相关资源
      最近更新 更多