. Advertisement .
..3..
. Advertisement .
..4..
Hi everyone, I’m learning about programs. While working, I try push my app to Heroku. As a result, I get the message:
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.
What can I do about the “fatal: ‘heroku’ does not appear to be a git repository” issue? Is there a better approach?
The cause:
You got this error because you did not link your heroku to your app name.
Solution:
A way to fix this error is that you need to run
heroku git:remote -a yourapp
in order to add a Heroku App as a remote Git repository.The source is Deploying With Git
You also can refer some steps in the following official Heroku article to solve your problem:
First, you need to create GIT:
Then using below command to initialize heroku app:
Finally, adding git remote:
You can safely using your app right now with:
You had better wait for some time and examine whether you get error/interrupt on console while using it or not. Let’s read this heroku article to have more information.
The following could be done in your root directory
// Initialize git for your project. Add the changes and commit.
// Create a heroku app and push it to heroku
You may not be able to determine where you are at any given point. To deploy on heroku you don’t even need github, just git. We hope this helps!