python - 使用 "git push heroku master"时出现错误

标签 python heroku github

我正在使用下面给出的命令将数据推送到 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/

相关文章:

github - 在 github 操作中使用 openssl

git - 如何在本地查看git中项目的Github WebView ?

github - 如何在新提交后自动取消批准 github 审查

python - 使用 Django 中的通用 View 将请求传递给模型表单

python - 有没有一种简单的方法来判断文件指针所在的行号?

python http 客户端卡在 100 继续

asp.net - Heroku dotnet 核心 - libunwind.so.8 : cannot open shared object - Common issue apparently

python - 使用无效的 uuid 时引发 404 而不是 500

heroku - Heroku 上的文档拆分

heroku - 我可以按子域制作 heroku 多个 web dynos 形成和路由吗?