Home > Software design >  Github started asking for password in terminal for every "git push" after "git push o
Github started asking for password in terminal for every "git push" after "git push o

Time:07-29

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.

CodePudding user response:

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

  • Related