我在使用“git push heroku master”时出错 [英] I got error while using "git push heroku master"

查看:708
本文介绍了我在使用“git push heroku master”时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用下面给出的命令将数据推送到heroku应用程序。

  git clone https:// git。 heroku.com/bigpro.git 
cd bigpro
git add。
git commit。 -m我的提交测试
git push heroku master

当我使用 git push heroku master 我有这样的东西..

 致命:'heroku '似乎不是git存储库
致命的:无法从远程存储库读取。

请确保您拥有正确的访问权限
并存在存储库。

然后我给了 heroku open 命令,I出现错误是

 ▸ENOTFOUND:getaddrinfo ENOTFOUND api.heroku.com api.heroku.com:443 

当我得到上述错误时,我试图通过使用 heroku git来更改终端上的命令:clone -a bigpro ,在做了我的更改之后,我给了 git push heroku master ,我收到了错误

  remote:!推拒绝bigpro。远程:到git.heroku.com/bigpro.git! 
[remote rejected] master - >主(预接收钩拒绝)错误:未能推动一些裁判'git.heroku.com/bigpro.git';


解决方案

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



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



接下来,照常进行更改。

然后你可以做 git push heroku master


I'm using the below given commands for push data to heroku app.

git clone https://git.heroku.com/bigpro.git
cd bigpro
git add .
git commit . -m "my test on commit" 
git push heroku master

When I used git push heroku master I got something like this..

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.

Then I gave heroku open command, I got an error which is

▸    ENOTFOUND: getaddrinfo ENOTFOUND api.heroku.com api.heroku.com:443

When I got the above error I tried to change commands on terminal by using heroku git:clone -a bigpro and after made my changes, I gave git push heroku master ,I got an error

 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'; 

解决方案

First, install the heroku toolbelt, and then type heroku login to setup your account properly.

Next, type heroku git:clone -a myapp where myapp is the name of your application in Heroku. This will pull the repository and setup the remotes correctly for you.

Next, make your changes as usual.

Then you can do git push heroku master

这篇关于我在使用“git push heroku master”时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆