我正在尝试使用this template和this guide将Go Web应用程序部署到Heroku。在本地工作得很好,但是当我尝试进行部署时
git push heroku master
我收到此错误:
remote: Parsing meta tags from https://github.com?go-get=1 (status code 200)
remote: can't load package: package github.com/f4ww4z/sipss: unknown import path "github.com/f4ww4z/sipss": cannot find module providing package github.com/f4ww4z/sipss
remote: ! Push rejected, failed to compile Go app.
remote:
remote: ! Push failed
remote: Verifying deploy...
remote:
remote: ! Push rejected to sipss.
remote:
To https://git.heroku.com/sipss.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/sipss.git'
deployment command is here之后的完整日志。
我看到heroku实际检测到github.com/f4ww4z/sipss
文件中的模块go.mod
(请参阅日志链接),那么为什么抛出此cannot find module providing package github.com/f4ww4z/sipss
?
答案 0 :(得分:1)
好像您的git repo是私人的。阅读此https://github.com/heroku/heroku-buildpack-go#private-git-repos