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]: Docker Compose deploy from Private Repo throws Permission denied error #3517

Open
JensUweB opened this issue Sep 20, 2024 · 4 comments
Labels
💤 Waiting for feedback Issues awaiting a response from the author.

Comments

@JensUweB
Copy link

JensUweB commented Sep 20, 2024

Error Message and Logs

We're trying to deploy one of our private repositories (gitlab.com team) via a self-hosted Coolify instance (running in the Hetzner Cloud). Most of our applications require a custom Dockerfile or docker-compose file to run optimally. Our websites & web apps are mostly build based on node.js (like in this case), therefore we want to use an Nginx container to improve static file handling.

Connecting the private repo with Coolify is in general no problem. Deploying with the "Dockerfile" Build Pack and setting the Dockerfile path to /docker/Dockerfile works as expected. The Container gets build and is up & running.

But when I switch the Build Pack to "Docker Compose", enter the compose file path /docker/docker-compose.yml and hit "Save" I get the following error message:

Cloning into '.'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Switching back to "Dockerfile" Build Pack and hitting save & deploy and it works again. Same branch in both cases.

This error is very frustrating and I hope someone can help us to solve this. Thanks a lot, loving your work so far!

Steps to Reproduce

  1. Fork my example repository
  2. Make your forked repo private
  3. Add new Application to Coolify with "Private Repository (with deploy key)" option
  4. Set Build Pack to "Docker Compose", set Docker Compose Location to /docker/docker-compose.yaml & hit save.
  5. Success (or rather error 😄 )!

Example Repository URL

https://github.com/JensUweB/coolify-docker-compose-bug

Coolify Version

v4.0.0-beta.341

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

Ubuntu 24.04

Additional Information

Please keep in mind that we normally use GitLab for all our repositories, therefore the "Private Repository (with deploy key)" option.

@JensUweB JensUweB added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Sep 20, 2024
@jomoflash
Copy link

Similar issue I am experiencing here, I later discovered that an identity option is missing in the git ls-remote <repo> main command as compared against others that were successful. The version I'm running is v4.0.0-beta.345

image

@jomoflash
Copy link

@JensUweB I Don't know if you later found a workaround, I was able get successful deploy with deploy keys directly added on projects or repositories. Discovered any key added directly to user account doesn't work or fails deploy... Can't tell if this is deliberate by design. ✅

@JensUweB
Copy link
Author

@JensUweB I Don't know if you later found a workaround, I was able get successful deploy with deploy keys directly added on projects or repositories. Discovered any key added directly to user account doesn't work or fails deploy... Can't tell if this is deliberate by design. ✅

I will test this later & post an update here. Thanks for your reply.

@peaklabs-dev peaklabs-dev added 💤 Waiting for feedback Issues awaiting a response from the author. and removed 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels Sep 27, 2024
@peaklabs-dev
Copy link
Collaborator

We added a fix for this in one of the last updates, so please upgrade to the latest version and then deploy key should work again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💤 Waiting for feedback Issues awaiting a response from the author.
Projects
None yet
Development

No branches or pull requests

3 participants