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

部署 – 无法将示例GOLang应用程序部署到Heroku

发布时间:2020-12-16 19:04:05 所属栏目:大数据 来源:网络整理
导读:我尝试将样本GO应用程序部署到Heroku列出的 here 但是当我运行命令时: git push heroku master 我收到以下错误: 计数对象:28,完成. Compressing objects: 100% (21/21),done. Writing objects: 100% (28/28),3.08 KiB,done. Total 28 (delta 6),reused 0
我尝试将样本GO应用程序部署到Heroku列出的 here

但是当我运行命令时:

git push heroku master

我收到以下错误:

计数对象:28,完成.

Compressing objects: 100% (21/21),done. Writing objects: 100%
(28/28),3.08 KiB,done. Total 28 (delta 6),reused 0 (delta 0)

! Heroku push rejected,no Cedar-supported app detected

To git@heroku.com:mysterious-refuge-1227.git ! [remote rejected]
master -> master (pre-receive hook declined) error: failed to push
some refs to ‘git@heroku.com:mysterious-refuge-1227.git’

示例代码可能已过时,因此我创建了一个简单的hello world GO App,但是从同一个git push命令我得到了以下错误:

Counting objects: 10,done.
Compressing objects: 100% (8/8),done.
Writing objects: 100% (10/10),1.16 MiB | 690 KiB/s,done.
Total 10 (delta 1),reused 0 (delta 0)

-----> Fetching custom git buildpack... done
-----> Go app detected
-----> Installing Go 1.1... done
       Installing Virtualenv... done
       Installing Mercurial... done
       Installing Bazaar... done
-----> Running: go get -tags heroku ./...
package echo/...: unrecognized import path "echo/..."
 !     Heroku push rejected,failed to compile Go app

To git@heroku.com:evening-reef-1503.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@heroku.com:evening-reef-1503.git'

关于如何解决这个问题的任何想法?

这是我的系统信息:

> GoLang版:go版本go1.1 linux / 386
> Kubuntu版本:12.10

我怀疑你原来的错误是因为你用heroku创建了应用程序.你正在使用Go,它是通过buildpack支持的,所以你应该用heroku create -b https://github.com/kr/heroku-buildpack-go.git创建应用程序.我相信演示应用程序犯了同样的错误 – my fork修复它 – 我也提交了拉取请求.

(编辑:李大同)

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

    推荐文章
      热点阅读