简体   繁体   中英

Can't push on heroku

I've just cloned one of my repositories on github, I've made some changes and I would like to send it on the heroku application. But when I try to run git push heroku master , I get :

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 to solve it?

This is because there's no remote named heroku. You can see your remotes by typing git remote -v . For my 'example' app I see the following:

$ git remote -v
heroku git@heroku.com:example.git (fetch)
heroku git@heroku.com:example.git (push)

If it's missing, you can add the remote with the following command:

git remote add heroku git@heroku.com:example.git

where example is the name of your heroku app.

Before you can do

$ git push heroku master

you need to setup heroku by following the steps given at Getting Started with Heroku . Once you have setup heroku, logged in,created your app.

Verify that git remote is added

$ git remote -v

it should list a remote named heroku . if it does then the error heroku' does not appear to be a git repository will go away

如果您已按照教程中的步骤操作,则只需再次登录:

cmd "heroke login"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM