Heroku go buildpack:找不到我创建的模块的导入路径

时间:2019-08-22 15:49:18

标签: go heroku buildpack

我正在尝试使用this templatethis 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

1 个答案:

答案 0 :(得分:1)

好像您的git repo是私人的。阅读此https://github.com/heroku/heroku-buildpack-go#private-git-repos