Not Authenticating login in the terminal

So this is my first time trying to commit so this very well may be user error but I was unable to find anything through my searching. When I try to make my first push by pushing the origin to github I get a login window. When I type my username it changes it to and says that they were unable to authenticate. It is pulling this error:

I tried using a token to login and when I set that up I set it to be open forever with all permissions. That worked for the first push; however, I am still getting a login window everytime I want to push to my repository. Do I need to make a token everytime? Anyone that can help this newbie is much appreciated!

I set up caching credentials in hopes that this would work and now I am getting permission denied on everything (git add, git commit, and git push) unless I run it as a sudo command. As long as I am running everything as root it works and doesn’t ask for credentials again.

Please do not run Git as root. Unless the files it manages are supposed to be owned by root, Git does not do anything that requires root access, and for security you should never provide root access if it isn’t needed. In fact running Git as root is likely to cause problems, because newly created files will then be owned by root and not writable for your normal user. :warning:

It’s hard to say what might be causing your problems without more details about your setup, the error messages in your screenshot look like you might have previously stored credentials in Kwallet (KDE). Maybe you just need to update those with a token? Or you changed your desktop environment and now Kwallet isn’t available any more?

Finally, you don’t need a token with all permissions. For pushing/fetching repo and workflow should be sufficient.

1 Like

Thanks for the information! I didn’t think of any of those possible issues when running as root. I haven’t changed my DE from KDE since I started using git. I will check my kwallet to see if my original and password credentials were saved in there when I get home and hopefully that fixes my issue.

1 Like

@airtower-luna Sorry for the late response but I was just now able to test. You were correct with the problem being in KDEwallet. I created a new token with the permissions that you suggested and made sure it was in KDEwallet correctly. Was able to do multiple pushes without it asking for key again. Thank you for the assistance!

1 Like