1

I already run the following codes and everything went smoothly:

git init
git add .
git commit —m 'name'
heroku create

But when I run this code:

git push heroku master

I get 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.
2
  • Please learn some Git basics before. Do you know what you are doing when you run those commands? Commented Mar 11, 2019 at 4:37
  • Though I didn't use Heroku, but I guess there is nothing like git remote add inside heroku create. Then the reference of "heroku" in git push heroku master is empty. Commented Mar 11, 2019 at 4:39

2 Answers 2

3

Maybe, as illustrated here, you need one more command before pushing:

cd /path/to/repo
heroku git:remote -a yourapp
Sign up to request clarification or add additional context in comments.

Comments

0

Make sure to do "heroku create" before git push heroku master

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.