我在使用“git push heroku master”时出错

2024-05-06 03:14:20 发布

您现在位置:Python中文网/ 问答频道 /正文

我使用下面给出的命令将数据推送到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时,我得到了这样的东西。。在

^{pr2}$

然后我发出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'; 

Tags: togit命令mastercomapiherokuremote
2条回答

在我从heroku克隆了我的第二份文件后,我就遇到了这种情况。突然{}就不起作用了,我会得到和你一样的错误。但当我尝试git push origin master时,效果很好。在

首先,安装heroku toolbelt,然后键入heroku login以正确设置您的帐户。在

接下来,输入heroku git:clone -a myapp,其中myapp是Heroku中应用程序的名称。这将拉动存储库并为您正确设置远程。在

接下来,像往常一样进行更改。在

然后你可以做git push heroku master

相关问题 更多 >