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

Enhancement: Connect to git repository on a port other than port 22 #6169

Open
2 tasks done
tommy04062019 opened this issue Dec 10, 2024 · 4 comments
Open
2 tasks done
Assignees
Labels
enhancement New feature or request priority/medium Indiacates that are significant but not urgent. To be prioritized Issues that are yet to be prioritized

Comments

@tommy04062019
Copy link

📜 Description

ssh: connect to host xyz.com port 22: Connection refused fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

👟 Reproduction steps

When I connect build pipeline to a repository

👍 Expected behavior

It should work with a private gitlab server on a custom ssh port

👎 Actual Behavior

Create a build pipeline with source type is Tag Creation

☸ Kubernetes version

Rancher RKE , Kubernetes Version 1.28

Cloud provider

Openstack

🌍 Browser

Chrome

🧱 Your Environment

No response

✅ Proposed Solution

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find any similar issue

🏢 Have you read the Code of Conduct?

@tommy04062019 tommy04062019 added the bug Something isn't working label Dec 10, 2024
@tommy04062019
Copy link
Author

tommy04062019 commented Dec 11, 2024

Screenshot 2024-12-11 at 14 15 01

In git-sensor pod. Have to do a trick to create a SSH config with custom port:

Host xyz.com
  Port 23xx

And test my private key:

/tmp $ git clone [email protected]:23xx/minhbui/adtech-ai-bot.git
Cloning into 'adtech-ai-bot'...
Welcome to AXX Gitlab
remote:
remote: ========================================================================
remote:
remote: The project you were looking for could not be found or you don't have permission to view it.
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

---> This is the error that appear on Devtron UI
When I test directly on git-sensor with bellow command. It works

cp /git-base/ssh-keys/2/ssh_pvt_key ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
/tmp $ git clone ssh://[email protected]:23xx/minhbui/adtech-ai-bot.git
Cloning into 'adtech-ai-bot'...
Welcome to AXX Gitlab
remote: Enumerating objects: 154, done.
remote: Counting objects: 100% (43/43), done.
remote: Compressing objects: 100% (37/37), done.
remote: Total 154 (delta 19), reused 17 (delta 6), pack-reused 111 (from 1)
Receiving objects: 100% (154/154), 447.35 KiB | 5.20 MiB/s, done.
Resolving deltas: 100% (23/23), done.

Why can't Devtron handle it?

@syskiller86
Copy link

I have the same problem. Why doen't Devtron support a private Git server with a custom port. Do not see anywhere in the document page

@abhibhaw abhibhaw added To be prioritized Issues that are yet to be prioritized priority/medium Indiacates that are significant but not urgent. labels Dec 31, 2024
@abhibhaw
Copy link
Member

Hey @syskiller86 @tommy04062019 I wouldn't say its a bug as we never implemented the same. Let me see how we can handle this enhancement in our future releases. If its kind of blocking for you in trying out devtron, please do let me know such that I can adjust its priority accordingly

@abhibhaw abhibhaw changed the title Bug: Connect to git repository on a port other than port 22 Enhancement: Connect to git repository on a port other than port 22 Dec 31, 2024
@abhibhaw abhibhaw added enhancement New feature or request and removed bug Something isn't working labels Dec 31, 2024
@tommy04062019
Copy link
Author

Hey @syskiller86 @tommy04062019 I wouldn't say its a bug as we never implemented the same. Let me see how we can handle this enhancement in our future releases. If its kind of blocking for you in trying out devtron, please do let me know such that I can adjust its priority accordingly

@abhibhaw : Hey, I think a lot of companies are going to switch their SSH port on their private repo servers for security reasons, just like we are. Right now, I can't test out Devtron in my setup because of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request priority/medium Indiacates that are significant but not urgent. To be prioritized Issues that are yet to be prioritized
Projects
None yet
Development

No branches or pull requests

5 participants