简体   繁体   中英

fatal: Authentication failed for

I have truble doing my first commit

i'm currently following git instruction:

echo "# my_Ohmyfood" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/MargYre/my_Ohmyfood.git
git push -u origin main

But at the last command, my Username and Password are ask, then I got the following:

error: unable to read askpass response from '/usr/libexec/openssh/gnome-ssh-askpass'

and

fatal: Authentication failed for 'https://github.com/MargYre/my_Ohmyfood.git/'

I must had this is my portable pc, and i have no problem with my fix one. Even thought I have had ssh key on both pc on my github account

SSH should not be involved with an HTTPS URL.

Try first:

unset SSH_ASKPASS

And push again.
It might have been set by /etc/profile.d/gnome-ssh-askpass.sh .

On Linux, install the Git Credential Manager and, if you have a graphical user interface session, servetservice .
That will cache your credentials HTTPS, which should be:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM