为什么我不能“heroku git:clone”并部署我的 Strapi 应用程序?

发布于 2025-01-16 09:57:16 字数 796 浏览 3 评论 0原文

我刚刚在 Heroku 上部署了一个全新的 Strapi 应用程序,并亲眼目睹了它的上线。但是,我尝试通过执行以下操作来克隆 Heroku CLI 存储库:

  1. $ heroku login
  2. $ heroku git:clone -a Mentorsbackend。 //项目名称
  3. $ cd Mentorsbackend

部署:

$ git add .
$ git commit -am "make it better"
$ git push heroku master

但是当一切完成后,我收到此消息:

heroku git:clone -a mentorsbackend                                                    Cloning into 'mentorsbackend'...
warning: You appear to have cloned an empty repository.

问题是存储库应包含我部署的 Strapi 项目文件。我仍然可以在这里看到它: https://mentorsbackend.herokuapp.com/

为什么我不能似乎能够克隆,这样我就可以在本地处理它 - 任何或所有回复将非常感激。

谢谢

I just deployed a brand new Strapi app on Heroku, and have seen it live. However, I tried to clone the Heroku CLI repository by doing the following:

  1. $ heroku login
  2. $ heroku git:clone -a mentorsbackend. //project name
  3. $ cd mentorsbackend

deploying:

$ git add .
$ git commit -am "make it better"
$ git push heroku master

but when its all done I got this message:

heroku git:clone -a mentorsbackend                                                    Cloning into 'mentorsbackend'...
warning: You appear to have cloned an empty repository.

The issue is that the repo should contain my deployed Strapi project files in it. I can still see it live here: https://mentorsbackend.herokuapp.com/

Why can't I seem to be able to clone so I can work on it locally - Any or all responses will be very much appreciated.

Thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

友谊不毕业 2025-01-23 09:57:16

为什么我似乎无法克隆以便在本地进行操作

这是一个反模式

Heroku 应用程序的 Git 存储库仅用于部署目的。从该存储库克隆作为一项功能并未得到正式支持,只能作为最后的手段尝试。 请勿使用此存储库作为应用程序的规范“来源”存储库。相反,请使用您自己的 Git 服务器或版本控制服务,例如 GitHub。

为什么你不能使用已有的本地副本,或者从 GitHub / GitLab / 无论你的原始服务器是什么进行克隆?

话虽如此,如果您通过 git push 进行部署,您应该能够克隆源代码。您确定没有通过 GitHub 集成进行部署吗?还是 Docker?这些部署选项不会通过 Heroku 的 Git 存储库。

Why can't I seem to be able to clone so I can work on it locally

This is an antipattern:

A Heroku app’s Git repository is intended for deployment purposes only. Cloning from this repository is not officially supported as a feature and should be attempted only as a last resort. Do not use this repository as your app’s canonical “origin” repository. Instead, use your own Git server or a version control service such as GitHub.

Why can't you work from the local copy you already have, or clone from GitHub / GitLab / whatever your origin server is?

Having said that, if you deployed via git push you should be able to clone your source code. Are you sure you didn't deploy via GitHub integration? Or Docker? Those deployment options don't go through Heroku's Git repository.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文