加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Python > 正文

python – 使用“git push heroku master”时出错

发布时间:2020-12-16 22:48:43 所属栏目:Python 来源:网络整理
导读:我正在使用以下给定的命令将数据推送到heroku应用程序. git clone https://git.heroku.com/bigpro.gitcd bigprogit add .git commit . -m "my test on commit" git push heroku master 当我使用git push heroku master时,我得到了类似的东西.. fatal: 'herok

我正在使用以下给定的命令将数据推送到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登录以正确设置您的帐户.

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

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

然后你可以做git push heroku master

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读