go - Heroku 去构建包 : Cannot find import path for my created module

标签 go heroku buildpack

我正在尝试使用 this template 将 Go 网络应用程序部署到 Heroku和 this guide .在本地工作得很好,但是当我尝试使用

进行部署时
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 实际上在 go.mod 文件中检测到模块 github.com/f4ww4z/sipss(参见日志链接),那么为什么它会抛出这个找不到提供包 github.com/f4ww4z/sipss 的模块 ?

最佳答案

看起来您的 git 存储库是私有(private)的。阅读此 https://github.com/heroku/heroku-buildpack-go#private-git-repos

关于go - Heroku 去构建包 : Cannot find import path for my created module,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57613057/

相关文章:

arrays - 如何生成数字序列

sockets - 通过 udp 套接字发送 float32 值

python - 使用 pip 将依赖项替换为自定义 fork

python - 将 newrelic 添加到通过 dokku 部署的 python 堆栈 (django)

heroku - 如何使用 Deis (PaaS) 设置和部署数据库

go - 如何在 Go 中的 `panic` 之后抑制堆栈跟踪?

php - Golang []byte 到 PHP 字符串

python - Heroku 的 Procfile 无法正常工作 - 使用 Waitress 的 Django

javascript - meteor 构建中的箭头功能导致 Heroku 部署崩溃

php - Cloudfoundry 命令行工具不会推送所有文件