First of all, make sure you’re logged in to git with your account credentials in your local environment. This error might have occured beacause of using some other github account’s credentials in the local environment.
If a popup comes for SSH login then you have to create a new personal access token and paste the token in the password field. You can find personal access token in the developer settings.
In github every commit is connected to an email address. To change your email address connected to every commit use this command :
git config — global user.email firstname.lastname@example.org
Replace email@example.com with the email address which is set primary in your github account. If you haven’t added one then do that first.
Now check if the user.email is set or not by using this command :
git config — global user.email
This email address should be displayed in terminal.
Now try if it is working or not by making a fresh commit and push the code to github.