I got an error when using "git push heroku master"

I use the commands below to transfer data to the heroku application.

git clone https://git.heroku.com/bigpro.git cd bigpro git add . git commit . -m "my test on commit" git push heroku master 

When I used git push heroku master , I got something like 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. 

Then I gave the heroku open command, I got an error

 β–Έ ENOTFOUND: getaddrinfo ENOTFOUND api.heroku.com api.heroku.com:443 

When I received the above error, I tried to change the commands on the terminal using heroku git:clone -a bigpro and after making the changes I gave git push heroku master , I got an error

  remote: ! Push rejected to bigpro. remote: To git.heroku.com/bigpro.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to 'git.heroku.com/bigpro.git'; 
+5
source share
2 answers

Install the hero’s toolkelt first, and then enter heroku login to set up your account correctly.

Then type heroku git:clone -a myapp , where myapp is the name of your application in Heroku. This will lead to pulling out the repository and properly configuring the remotes.

Then make your changes as usual.

Then you can do git push heroku master

+2
source

This happened to me after I cloned a second copy of my files from the hero. Suddenly git push heroku master will not work, and I get the same error as you. But when I tried git push origin master , it worked fine.

+1
source

All Articles