Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Failed to clone Git submodule #2731

Open
marinofranz opened this issue Jul 1, 2024 · 2 comments
Open

[Bug]: Failed to clone Git submodule #2731

marinofranz opened this issue Jul 1, 2024 · 2 comments

Comments

@marinofranz
Copy link

Description

Hi,

I've just created an application on Coolify that pulls from a private GitHub repository. Said repository has a submodule, and Coolify doesn't seem to clone it correctly. I've made sure that Submodules are turned on under Advanced settings for the application. Is there something permission wise that needs to be addressed on the GitHub App itself, or is this a bug?

There are 2 other issues that report the same problem, which have been closed, but with no resolution:
#795 #1050

Happy to provide more information if needed 🙂

Minimal Reproduction (if possible, example repository)

  1. Create an application
  2. Choose Dockerfile as Build Pack (I've also tried Nixpacks)
  3. Deploy
  4. An error occurs and is displayed in the deployment log

Exception or Error

Cloning into '/artifacts/q88kow8'...
Submodule 'prisma' (https://github.com/???/prisma.git) registered for path 'prisma'
Cloning into '/artifacts/q88kow8/prisma'...
fatal: could not read Username for '[https://github.com':](https://github.com'/) No such device or address
fatal: clone of 'https://github.com/???/prisma.git' into submodule path '/artifacts/q88kow8/prisma' failed
Failed to clone 'prisma'. Retry scheduled

Organization name has been redacted from the logs.

Version

v4.0.0-beta.306

@marinofranz
Copy link
Author

Right, I've figured it out. For those who are having the same problem, you need to make sure that the URL for your submodules are relative, and not absolute. For some reason (something to do with authentication I suppose), the submodules will only clone when using the SSH protocol.

These are the changes I made to my .gitmodules file.

[submodule "prisma"]
	path = prisma
-	url = https://github.com/???/prisma.git
[submodule "prisma"]
	path = prisma
+	url = ../prisma.git

This might be worth mentioning in the Coolify knowledge base under the Applications page.

@kyuumeitai
Copy link

Live saving! great job finding it @marinofranz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants