Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github started asking for password in terminal for every "git push" after "git push origin +HEAD"

Tags:

git

github

Before anything else: I'm aware of the difference between SSH and HTTPS in this case. I usually create and manage my repos from IntelliJ or VS Code, but even when manually pushing to a remote from the terminal my credentials were never required, even though all my repositories use HTTPS. In fact, yesterday I was using a terminal window to push my commits to a given remote repository and it didn't ask me for anything. Today I needed to do a git push origin +HEAD to this very same repository, it asked for my username and password (PAT), and now every time I want to push anything it prompts me for the password.

I'm on Linux.

like image 378
Alex Braga Avatar asked Mar 21 '26 14:03

Alex Braga


1 Answers

You should config cache credential for linux

git config --global credential.helper cache

The previous command will cache the credentials for some time (default 15 minutes)

If you want to store the credentials for ever

git config --global credential.helper store

For more information view this answer

like image 169
Eng_Farghly Avatar answered Mar 23 '26 07:03

Eng_Farghly



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!