1

I'm running TFS 2013 with a GIT team project. When I perform a git clonefrom one of the local Windows servers I don't have any issues:

-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/

but when I perform a git clone from Linux, I get the following error:

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
Undo
  • 25,519
  • 37
  • 106
  • 129

1 Answers1

3

Error: The requested URL returned error: 401 while accessing https://github.com/Joey-myproject/repo.git/info/refs fatal: HTTP request failed

is an often reoccuring error.

One of the reasons of this happening is because the client is not authorized to access to that resource.

A general solution is to check for the following:

  1. Do you have a stable git version?
  2. Is the remote correct configured?
  3. If 2FA is enabled, if so provide an access token.
  4. Double check your permissions(username/password in configs) perhaps also try to use the format ' https://username@mydomain.org/project.git''
  5. Try ssh instead of https

I am not sure, but have you already seen this link Can't clone a github repo on Linux via HTTPS? It can give some extra information.

Community
  • 1
  • 1
Joey Dorrani
  • 247
  • 1
  • 1