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

Ability to use a custom port for git #706

Open
xyvs opened this issue Nov 14, 2024 · 3 comments
Open

Ability to use a custom port for git #706

xyvs opened this issue Nov 14, 2024 · 3 comments

Comments

@xyvs
Copy link

xyvs commented Nov 14, 2024

To Reproduce

  1. Add a new repo with a custom port in the url
  2. The application can't be pulled

Current vs. Expected behavior

I have my own self hosted gitea with a custom ssh port, I already set my ssh keys but can't get it to work with a custom ssh port.

Cloning Repo Custom [email protected]:1234/user/repo.git to /etc/dokploy/applications/.../code: ✅
Cloning into '/etc/dokploy/applications/.../code'...
ssh: connect to host 192.168.1.11 port 22: Connection refused
fatal: Could not read from remote repository.```


### Provide environment information

```bash
Ubuntu, Self Hosted.

Which area(s) are affected? (Select all that apply)

Application

Additional context

No response

@xyvs xyvs added the bug Something isn't working label Nov 14, 2024
@Siumauricio
Copy link
Contributor

@Siumauricio
Copy link
Contributor

No, I'm not sure if this is a dokploy bug, but I was able to clone the repository on a self hosted gitea server on a different port than port 22 and it worked, however I don't know how I got it to work, I played around with the configuration a lot, this definitely has something to do with the gitea configuration than a dokploy bug, I also suggest reading more about gitea configuration, if anyone considers this to be a dokploy bug I am willing to accept a PR on this, I have spent a lot of time on previous occasions trying to fix it, but it is more of a configuration problem.

https://docs.gitea.com/help/faq#ssh-common-errors

You can see we are not doing anything strange or something weird, is just a git clone.... with a few flags to pass in the case the url is SSH

https://github.com/Dokploy/dokploy/blob/f7fa8e74af16a64560025078e775a7031601a726/packages/server/src/utils/providers/git.ts#L72C1-L98C5

@Siumauricio Siumauricio added awaiting-response and removed bug Something isn't working labels Nov 17, 2024
@coharms
Copy link

coharms commented Nov 18, 2024

I can only talk about my setup, but I have the same error. Gitea is running flawlessly for years now on a custom port. A regular git clone with the URL copied directly from Gitea works as expected.

As indicated in the logs above at least the error message is wrong as it takes the default port 22. I saw the same message in my setup, too. In the URL, even though probably redacted, the port 1234 is mentioned. It might still be the case that it is not directly a bug in dokploy, but it could be a hint into the right direction.
Is that a standard message used or is this the output of the SSH Client? If it is the output of the SSH client, then the port is not used even though it is rightfully indicated in the URL.

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

No branches or pull requests

3 participants