2

i created a node backend and a heroku server, using cmd, i logged into heroku using heroku cli, and created a heroku app and connected my mongodb uri to the server, after that i initialized a git repository using git init, and then i did git add . the git commit -m "" then i pushed it to heroku using git push heroku master and did heroku ps:scale web=1 and everything worked perfectly and i have been using my backend since. but today i tried to commit something new to heroku using git commit -m "" and it gave me this error message

Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'eme@PC.(none)')

i then tried to push and it gave me this error:

error: src refspec master does not match any
error: failed to push some refs to 'heroku'

i have tried the solutions of some stackoverflow post with no avail

  • You haven't configured your git(globally). set your git configuration (commands suggested to run) and then try to first push to repo management tool (github, bitbucket etc) and then login to heroku, `heroku login` from cli and then push the branch to heroku. – Abhishek Jadav Apr 17 '22 at 09:43
  • 1
    You haven't configured your git(globally). set your git configuration (commands suggested to run) and then try to first push to repo management tool (github, bitbucket etc) and then login to heroku, `heroku login` from cli and then push the branch to heroku. – Abhishek Jadav Apr 17 '22 at 09:44
  • @AbhishekJadav i have done that and it worked, but now when i run `git push heroku master` it gives me this error: `fatal: 'heroku' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.` – Precious Affiah Apr 17 '22 at 11:06
  • 1
    have a look at the output of `git remote -v` to see what remotes you have set up. – Abhishek Jadav Apr 17 '22 at 12:23
  • 1
    All you need to do is `heroku git:remote -a `, and it be solved – Curtis Crentsil Apr 17 '22 at 13:22
  • Use `git push heroku master` – majid Apr 17 '22 at 17:40

0 Answers0