To troubleshoot this issue firstly check the heroku logs with command:
heroku logs -tail
Check for the error here,
Make sure you have logged into heroku with:
heroku auth:login
Check the list of apps in heroku with:
heroku apps
make sure you have initialized the git repository in the directory where your code is and not it’s parent or sub directory.
You can initialize it with git init
Add the files with git add .
Commit the files with git commit -m “Your message”
Add the remote git into heroku with:
heroku git:remote -a app-name
You can manually add the heroku git remote repository with the comand:
git remote add heroku git@heroku.com:arati.git
Check the remote with git remote -v
You can add ssh keys for heroku with command heroku keys:add
It will create ssh keys in .ssh folder of your home directory. Make sure you have ssh-keygen in your path otherwise you’ll be getting an error as: ‘ENOENT’: spawn ssh-keygen ENOENT
You should be able to push your code with: git push heroku master