Git 오류 치명적 : 인증 실패
git을 사용하여 리포지토리를 Visual Studio 팀 서비스 프로젝트에 푸시하려고하는데 오류가 발생합니다.
fatal: Authentication failed for (url of team project
cmds를 사용하고 있습니다.
git remote add origin
https://XXXXXXX.visualstudio.com/DefaultCollection/_git/project
git push -u origin -–all
이것에 대한 수정 사항에 대한 아이디어가 있습니까?
감사!
최근에 동일한 문제 (Visual Studio 2017 및 Windows 10)가 발생하여 다음 방법을 사용하여 해결했습니다.
제어판-> 자격 증명 관리자-> Windows 자격 증명 관리-> git 저장소의 항목을 선택하고 사용자 및 암호를 편집합니다.
끝난.
GIT CLI를 사용하고 Visual Studio의 GIT 래퍼에서 빌드와 상호 작용하지 않으려면 대체 인증 자격 증명 을 활성화해야합니다.
어떻게?
Open your account (VS Online account)
-> click on your name on the top right
-> My Profile
-> Credentials.
설정합니다.
오늘 가장 좋은 방법 은 VSO, GitHub를 지원하고 매달 개선되고있는 https://github.com/Microsoft/Git-Credential-Manager-for-Windows 를 설치 하는 것입니다.
나는 같은 문제에 직면했습니다. 오류 출력 창은 다음과 같습니다.
단계에 따라 문제가 해결되었습니다.
- 제어판-> 자격 증명 관리자-> Windows 자격 증명으로 이동합니다.
Generic Credential 아래에서 git 및 update 비밀번호 항목을 선택합니다.
암호는 Windows (시스템) 로그인 암호와 동일해야합니다.
VSTS에서 URL은 다음과 같습니다. vsts에서 git clone url을 복사하면 항상
https : // orgname @ dev.azure.com / org / project / _git / repo
orgname @ 을 VSTS- > 프로필-> 보안 에서 만든 대체 사용자 이름으로 바꿉니다 .
최종 자식 URL-
https : // alternateusername @ dev.azure.com / org / project / _git / repo
Delete '.git/config' and try again. Attention this will may reset some git settings too!
I've tried alternative credentials and Personal Access Token for many times with right credential and it kept telling me "fatal: Authentication failed".
Finally, I found there is a file named ".git/config" located at the root of my Repo. I deleted this file and type in my credentials again, it worked.
I suddenly started receiving this error when attempting to push changes from VS2017 to a VSTS Git repository. This functionality had worked the day before.
I checked my git.log file and saw a different exception :-
19:43:57.116665 ...zureAuthority.cs:184 trace: [ValidateCredentials] server returned: 'Unable to connect to the remote server.
I downloaded the latest Git CredentialManager source from Gits Credential Manager repo and debugged it.
Once authenticated, the following exception occurred :-
No connection could be made because the target machine actively refused it 127.0.0.1:8888
I then realised that I had recently setup Fiddler to act as a proxy for all services as per the article capturing-traffic-from-.net-services-with-fiddler
Once I ran Fiddler, I was able to successfully connect.
I've tried lots of options, but the one that worked for me was to:
Download the Git Password Manager from its Releases section
Try to do simple
git fetch
which will automatically bring the window(alternate to default windows one for example) and ask to enter username and password but with more elegant way than the standard one.
After correctly entering the credentials it worked, though I was getting an error before.
P.S. If you are getting "Wrong Credentials" kind of errors always check if the repository username and password are correct. If you hesitate just reset the password and try to use the same one in the Git Password manager window.
My solution was a little bit different and faster :)
- Go to Windows Credentials (Start-> Windows Credentials) and remove credentials for your repository (they starts with git:xxx)
Go to VSCode and in Terminal write:
config credential.helper wincred
Go to Visual Studio (no VSCode) and make a git pull. A popup will show asking for credentials. Put your credentials for the repo
Go to VSCode and make a git pull. Credentials were automatically fetched from wincred store
Credentials are automatically created and stored in wincredentials, so the next time you cannot be asked for credentials. (also a Personal Access Token will be provided from visualstudio.com if you are using DevOps hosted git repo).
I had the same problem, I tried to update my password using windows credential manager, it still didn't fix the issue
Control Panel --> Credential Manager --> Manage Windows Credentials --> Choose the entry of the git repository, and Edit the user and password.
I then deleted all the git related entry in credentials manager and then tried to use Git using visual studio, this time it prompted for new credentials
All i needed were the correct credentials. while deploying to a web app, i had to go to Deployment Center, Deployment Credentials. And then use either the App Credentials or create User Credentials. After this, delete the cached credentials on the local machine (windows: Control Panel\User Accounts\Credential Manager). run "git push webapp master:master" again, enter either of the Deployment Credentials. This worked for me.
In the case you are on something else then windows and your boss is forcing you to use azure devops, and you don't want to use SSH, and you want to use to plain old way, do the following.
'대체 자격 증명'을 활성화해야하거나 (성가신 일이라는 것을 알고 있습니다) 액세스 토큰을 만들어야합니다. 이 경우 액세스 토큰을 만드는 것은 임시 임의 암호와 비슷합니다. Windows 도구를 사용하면 자동으로 수행됩니다.
어쨌든 Security
오른쪽 상단 모서리에있는 프로필 상황에 맞는 메뉴 로 이동합니다 .
그런 다음 관리자 권한이있는 상사 / 관리자 / 친구가 선호하는 경우 '대체 자격 증명'이 활성화됩니다. 그렇지 않으면 운명을 받아들이고 '개인 액세스 토큰'을 생성하십시오.
참고 URL : https://stackoverflow.com/questions/35834117/git-error-fatal-authentication-failed
'IT박스' 카테고리의 다른 글
Asp.net 신원 확인 오류 (0) | 2020.12.14 |
---|---|
Spring Security에 대한 로깅을 어떻게 활성화합니까? (0) | 2020.12.14 |
HTML 양식에서 텍스트 영역의 값을 어떻게 "미리 채울"수 있습니까? (0) | 2020.12.14 |
screen.availHeight와 window.height ()의 차이점 (0) | 2020.12.14 |
UITextField 키보드를 비활성화 하시겠습니까? (0) | 2020.12.14 |