'Fatal: 'heroku' does not appear to be a git repository

When I run git push heroku main, I'm getting this. To let you know that I this is my second project I'm trying to push to heroku. I already pushed a project following heroku document, it worked without any fatal. But this time I'm getting this fatal. I don't why I'm getting this

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.



Solution 1:[1]

The same started happening to me after they reset my password (due to that issue). Actually, in my local machine was still working but when I tried to deploy from my GitHub it showed me that message. I had to update my API Key (in my case, updated it in my GitHub SECRETS section). After this, things went back to normal.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Filipe Veber