Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Logon failed, use Ctrl + C to cancel basic credential prompt

I'm facing problems while trying to pull/push my code into a GitHub repository using the cmd prompt for the last two days. How can I resolve this issue?

Logon failed, use Ctrl + C to cancel basic credential prompt. Username for 'https://github.com': satyendrasingh8 Password for 'https://[email protected]': remote: Invalid username or password. fatal: Authentication failed for 'https://github.com/satyendrasingh8/chatApp.git/'

like image 354
satyendra singh Avatar asked Nov 23 '20 04:11

satyendra singh


People also ask

How do I get rid of basic credential prompt?

authentication - Logon failed, use Ctrl + C to cancel basic credential prompt - Stack Overflow. Stack Overflow for Teams – Start collaborating and sharing organizational knowledge.

How do I stop Git from asking for credentials?

You can avoid being prompted for your password by configuring Git to cache your credentials for you. Once you've configured credential caching, Git automatically uses your cached personal access token when you pull or push a repository using HTTPS.


2 Answers

Fitz_Hoo is right! I just wanted to give a more detailed explanation that fix my issue. Essentially GitHub deprecated their password authentication recently (you can read more by clicking here).

Enter image description here

Now instead of adding your username/email and password, you will login with your browser. The image below is the new interface. As Fitz_hoo mentions, you must update your Git to see the new changes!

Enter image description here

If you are using Windows, you can simply use this command below to update your Git:

git update-git-for-windows 
like image 168
ousecTic Avatar answered Sep 21 '22 12:09

ousecTic


I fixed the problem just simply by upgrading my client Git Bash to the latest version!

When I encountered the problem, I received an email from a GitHub official, who told me the reason was mainly the Git version was incompatible:

GitHub has changed how users authenticate when using Git for Windows, and now requires the use of a web browser to authenticate to GitHub. To be able to login via web browser, users need to update to the latest version of Git for Windows. You can download the latest version at:

https://gitforwindows.org/

like image 42
Fitz_Hoo Avatar answered Sep 18 '22 12:09

Fitz_Hoo