Heroku“克隆一个空存储库”一个不为空的存储库的消息
考虑到Heroku/github问题,我正在尝试使用Heroku CLI发布说明。
它在我的管道中的一个环境中正常工作,但不是针对另一个环境。它返回“您似乎已经克隆了一个空存储库”。当我运行以下内容时。
heroku git:clone -a xxxxxx-release
Cloning into 'xxxxxx-release'...
warning: You appear to have cloned an empty repository.
在此运行环境中有很多代码。我看了一下 - https://help.heroku.com/xobuhlkq/why-do-i-see-see-see-a-message-you-apr------------------------------------------------------------------- -cloned-an-empty-Repository-当使用 - heroku-git-clone - 但它说答案必须执行w/ buttons,我们不使用。我试图在那里混淆,但似乎无法为当前应用程序制作一个按钮,只是一个新应用程序。
因此,请注意,我可以尝试添加一个文件并提交它,但这也返回一个错误:
remote: ! Push rejected to xxxxxx-release.
remote:
To https://git.heroku.com/xxxxxx-release.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/xxxxxxx-release.git'
我现在对如何释放该分支机构感到不知所措。事先感谢您的任何帮助。
Given the Heroku/Github problems, I'm trying to use the Heroku CLI release instructions instead.
It worked fine for one of the environments in my pipeline, but it's not for the other. It returns "You appear to have cloned an empty repository." when I run the following.
heroku git:clone -a xxxxxx-release
Cloning into 'xxxxxx-release'...
warning: You appear to have cloned an empty repository.
There is plenty of code on this running environment. I took a look at this - https://help.heroku.com/XOBUHLKQ/why-do-i-see-a-message-you-appear-to-have-cloned-an-empty-repository-when-using-heroku-git-clone - but it says the answer has to do w/ buttons, which we don't use. I've tried to muddle there but can't seem to make a button for a current app, just a new one.
S.O. notes that I can try adding one file and committing it, but that also returns an error:
remote: ! Push rejected to xxxxxx-release.
remote:
To https://git.heroku.com/xxxxxx-release.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/xxxxxxx-release.git'
I'm now at a loss on how to release to this branch. Thanks in advance for any help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不要从Heroku克隆。
由于您一直在通过GitHub部署,因此您应该已经拥有本地副本。只需使用它:
如果出于某种原因,您没有本地副本,请从 github 中克隆,然后按上述操作。
克隆/从Heroku :
当您从Heroku克隆时获得空存储库的原因是, github部署不会填充Heroku托管的存储库:
Don't clone from Heroku.
Since you've been deploying via GitHub you should already have a local copy. Just use that:
If, for whatever reason, you don't have a local copy, clone from GitHub then proceed as above.
Cloning / pulling from Heroku isn't meant to be part of your regular workflow:
And the reason you're getting an empty repository when you clone from Heroku is that GitHub deploys don't populate the Heroku-hosted repository: