1

I am trying to push a branch to a repo on tfs and I am getting this error: fatal: Authentication failed for xxxxxxxxx

I tried adding credentials to the credentials manger as answered here but it didn't work

any idea what's wrong here?

Remon Shehatta
  • 1,324
  • 1
  • 10
  • 21

1 Answers1

0

You can try using Personal access token by adding an extra header to Git commands. See below:

$MyPat = 'yourPAT'
$B64Pat = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes(":$MyPat"))
git -c http.extraHeader="Authorization: Basic $B64Pat" clone http://tfsserver:8080/tfs/DefaultCollection/_git/projectName

See document here for more information.

Levi Lu-MSFT
  • 27,483
  • 2
  • 31
  • 43