Skip to content

[Bug]: Error When Using Full SSH Protocol Format in Git Source Repository Configuration #5846

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

Open
boizz opened this issue May 18, 2025 · 4 comments

Comments

@boizz
Copy link

boizz commented May 18, 2025

Error Message and Logs

When configuring the Git Source Repository using the full SSH protocol URL (ssh://git@hostname:port/path), the build process fails with the following error:

Oops something is not okay, are you okay? 😢 
ssh: Could not resolve hostname ssh: Name does not resolve 
fatal: Could not read from remote repository. 

Please make sure you have the correct access rights 
and the repository exists. 
Deployment failed. Removing the new version of your application.

Steps to Reproduce

  1. Navigate to Projects > [Env] > Git Source.
  2. Enter the full SSH URL (e.g., ssh://[email protected]:2202/path/to/repo.git) to Repository.
  3. Save the configuration and trigger Deploy.
  4. Observe the error in the build logs.

Expected Result:
The system should clone the repository successfully using the full SSH protocol URL.

Actual Result:
Build fails with hostname resolution error, implying improper parsing of the SSH URL format.

Example Repository URL

No response

Coolify Version

v4.0.0-beta.418

Are you using Coolify Cloud?

No (self-hosted)

Operating System and Version (self-hosted)

No response

Additional Information

No response

@boizz boizz added 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels May 18, 2025
@Cinzya
Copy link

Cinzya commented May 19, 2025

As far as I know coolify doesn't support the Full SSH Protocol format. If you want it to use SSH, you just type the url in without the leading ssh:// like so:

[email protected]:2202/path/to/repo.git

@qglrs
Copy link

qglrs commented May 19, 2025

I’m experiencing the same issue as @boizz . I’ve noticed a very strange behavior, but I have no idea what could be causing it.

On the host machine (where Coolify is installed), I've installed Gitea — and it generally works fine. However, when trying to create an Application in Coolify as @boizz described, and while setting up a connection to [email protected]:2202/path/to/repo.git, I get the error

ssh: connect to host example.com port 2202: Connection refused
fatal: Could not read from remote repository.

But here’s the weirdest part: on the host machine, my /root/.ssh/id_rsa key is being replaced with the one I configured under Coolify → Keys & Tokens. Why is that happening?

@Cinzya
Copy link

Cinzya commented May 19, 2025

@qglrs Your error indicates, that coolify is now correctly trying to connect to your Gitea, but the connection is being blocked by something. Make sure you have Gitea properly configured to accept SSH connections in the first place: https://docs.gitea.com/next/help/faq#ssh-issues

I'm not sure if I understand your last question. You need to configure / add the SSH key via Coolify inside Keys & Tokens. Coolify won't use your private keys from /root/.ssh and it stores it's own private keys under /data/coolify/ssh.

@Cinzya Cinzya removed 🐛 Bug Reported issues that need to be reproduced by the team. 🔍 Triage Issues that need assessment and prioritization. labels May 19, 2025
@qglrs
Copy link

qglrs commented May 21, 2025

@Cinzya you got right. I had a issue with firewall to connect to my Gitea. However, I’ve encountered another problem:

[email protected]: Permission denied (publickey).

What’s very strange to me is that the Coolify is overwriting the /root/.ssh/id_rsa with the file /data/coolify/ssh/keys/ssh_key@..., and the git clone command is being executed at the host level, not from within the Coolify container.
Is this the expected behavior?

I’ve (hopefully temporarily) resolved this issue by configuring the file /root/.ssh/config on the host as below

Host example.com
    Port 2202
    User git
    IdentityFile /data/coolify/ssh/keys/ssh_key@...

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

3 participants