使用Cloudflare页面与子模块部署回购

发布于 2025-02-11 06:16:56 字数 202 浏览 1 评论 0原文

我正在使用CloudFlare页面部署一个项目,并且可以在原始GIT克隆的日志中看到,但是当将supdules撤下时,抛出以下错误致命:无法读取'https:/ https的用户名。 /Github.com,该项目位于Github的同一组织下,并且GitModules在本地正常工作。

关于如何使子模型与CloudFlare页面正常合作的任何想法?

I'm deploying a project using cloudflare pages, and can see in the logs the initial git clone is working, however when the submodules are being pulled down the following error is thrown fatal: could not read Username for 'https://github.com, the project are under the same organisation in github and .gitmodules is working as expected locally.

Any ideas on how to get submodules to working properly with cloudflare pages?

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

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

发布评论

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

评论(2

眼泪淡了忧伤 2025-02-18 06:16:56

我最终通过更新.gitModules文件并将SRC设置为“ username@personalAccessToken”来解决此问题。您也可以使用您的个人访问令牌。

您的文件应该看起来像这样

[submodule "src/common"]
path = src/common
url = https://[Token]@github.com/[Org]/[Repo].git

可以帮助任何有类似问题的人

I ended up solving this by updating the .gitmodules file and setting the src to include username@personalaccesstoken. You can also just use your personal access token.

Your file should look like this

[submodule "src/common"]
path = src/common
url = https://[Token]@github.com/[Org]/[Repo].git

Hopefully that helps anyone else who has a similar issue

白云不回头 2025-02-18 06:16:56

另一种解决方案是授予CloudFlare的许可。然后将.gitModules更改为使用SSH。

[submodule "src/common"]
path = src/common
url = [email protected]:[Org]/[Repo].git

An alternative solution is to give Cloudflare permission to the submodule repository. Then change the .gitmodules to use ssh.

[submodule "src/common"]
path = src/common
url = [email protected]:[Org]/[Repo].git
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文