我正在使用下面给出的命令将数据推送到 heroku 应用程序。
git clone https://git.heroku.com/bigpro.git
cd bigpro
git add .
git commit . -m "my test on commit"
git push heroku master
当我使用 git push heroku master
时,我得到了这样的东西..
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.
然后我给了heroku open
命令,我得到了一个错误
▸ ENOTFOUND: getaddrinfo ENOTFOUND api.heroku.com api.heroku.com:443
当我遇到上述错误时,我尝试使用 heroku git:clone -a bigpro
在终端上更改命令,在进行更改后,我给了 git push heroku master
,我得到一个错误
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';
最佳答案
首先,安装 heroku toolbelt ,然后键入 heroku login
以正确设置您的帐户。
接下来,输入 heroku git:clone -a myapp
其中 myapp
是您的应用程序在 Heroku 中的名称。这将为您拉取存储库并正确设置 Remote 。
接下来,照常进行更改。
然后你可以做 git push heroku master
关于python - 使用 "git push heroku master"时出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39189780/