Deploying repos with submodules using cloudflare pages

1.1k views Asked by At

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?

1

There are 1 answers

1
mthomp On BEST ANSWER

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