Git fatal error: authentication error

I'm trying to use git to translate my repository into a visual studio command service project, but I get an error:

fatal: Authentication failed for (url of team project

I use cmds:

git remote add origin
     https://XXXXXXX.visualstudio.com/DefaultCollection/_git/project

git push -u origin -–all

Any fix idea for this?

Thank!

+57
source share
13 answers

I recently had the same issue (Visual Studio 2017 and Windows 10), and I solved it in the following way:

Control Panel -> Credential Manager -> Manage Windows Credentials -> Select an entry in the git repository and change the username and password.

Done.

+87
source

GIT CLI ​​ GIT Visual Studio,

?

Open your account (VS Online account) 
-> click on your name on the top right 
-> My Profile
-> Credentials.

.


enter image description here

enter image description here

+32

. : authentication failed Image

:

  1. → → Windows
  2. Generic Credential git & update.

    solution window

  3. Windows.

+13

VSTS URL-: GIT-Clone URL- VST,

https://orgname@dev.azure.com/org/project/_git/repo

orgname @ , VSTS → profile → Security.

URL- git -

https://alternateusername@dev.azure.com/org/project/_git/repo

+10

'.git/config' . , reset git!

, ": ".

, , ".git/config", . , .

+3

VS2017 VSTS Git. .

git.log : -

19: 43: 57.116665... zureAuthority.cs: 184 trace: [ValidateCredentials] : " .

Git CredentialManager Gits Credential Manager repo .

: -

, . 127.0.0.1:8888

, Fiddler capturing-traffic-from-.net-services-with-fiddler

Fiddler, .

+2

, , , :

  1. Git Password Manager " "

  2. git fetch (, ) , , .

, .

PS "Wrong Credentials", . , Git.

+1

:)

  1. Windows (Start-> Windows) ( git: xxx)
  2. VSCode :

    config credential.helper wincred

  3. Visual Studio ( VSCode) git pull. .

  4. VSCode git pull. wincred

wincredentials, . ( visualstudio.com, DevOps git repo).

+1

, Windows, -

→ → Windows → git .

, git, , Git visual studio, .

0

, , . - , . . (: \ \ ). "git push webapp master: master", . .

0

- , Windows devops, SSH, , .

" " ( , ) . . Windows, .

, Security .

Security settings

, //, , , " " . " ".

Security settings

0
source

1- enable alternate authentication credentials.

I found it on this page https://xxxxxxxxxxxxxxxx.visualstudio.com/_admin/_home/settings . chnage xxxxxxxxxxxxxxxx by your username.

2- Install Git Credential Manager.

look at https://www.visualstudio.com/en-us/docs/git/set-up-credential-managers

I suggest you not to use Microsoft products. i am using bitbucket.org

-3
source

All Articles