'heroku' does not appear to be a git repository

前端 未结 21 1947
失恋的感觉
失恋的感觉 2020-12-12 08:47

When I try to push my app to Heroku I get this response:

fatal: \'heroku\' does not appear to be a git repository
fatal: Could not read from remote repositor         


        
相关标签:
21条回答
  • 2020-12-12 09:17

    I had the same issue, but later I found out that I forgot to create an app before deploying it. Try the following steps in terminal.

    heroku login
    heroku create
    

    I am just learning heroku and often forget the steps so I wrote an article about it. You can find it here: https://medium.com/@saurav.panthee/deploy-flask-app-to-heroku-under-3-minutes-2ec1c0bc403a

    0 讨论(0)
  • 2020-12-12 09:17

    i forgot to create a domain name before running git push heroku main. Creating a domain name resolved the problem.

    0 讨论(0)
  • 2020-12-12 09:18

    Follow this steps:

    $ heroku login
    

    Create a new Git repository
    Initialize a git repository in a new or existing directory

    $ cd my-project/
    $ git init
    $ heroku git:remote -a appname
    

    Deploy your application
    Commit your code to the repository and deploy it to Heroku using Git.

    $ git add . 
    $ git commit -am "make it better"
    $ git push heroku master
    

    Existing Git repository
    For existing repositories, simply add the heroku remote

    $ heroku git:remote -a appname
    
    0 讨论(0)
提交回复
热议问题