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]: Cannot git clone a gitea repository using ssh #227

Closed
cmoulliard opened this issue Apr 26, 2024 · 7 comments · Fixed by #478
Closed

[Bug]: Cannot git clone a gitea repository using ssh #227

cmoulliard opened this issue Apr 26, 2024 · 7 comments · Fixed by #478
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@cmoulliard
Copy link
Contributor

What is your environment, configuration, and command?

We cannot git clone an internal gitea repository using ssh

git clone [email protected]:giteaAdmin/idpbuilder-localdev-my-app-manifests.git
Cloning into 'idpbuilder-localdev-my-app-manifests'...
ssh: connect to host gitea.cnoe.localtest.me port 22: Connection refused
fatal: Could not read from remote repository.

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

What did you do and What did you see instead?

We should be able to ssh / git clone a gitea repository as reported here "HowTo" #32 if we bind the ssh port of gitea with the nodePort and that we expose too this port on the kind cluster

Until now, gitea is configured with port 22/2222

Screenshot 2024-04-26 at 17 29 19

Additional Information. Logs.

No response

@cmoulliard cmoulliard added the bug Something isn't working label Apr 26, 2024
@nabuskey
Copy link
Collaborator

Good catch. I haven't really needed to clone from gitea to local so did not test this.

@nabuskey nabuskey added the good first issue Good for newcomers label Apr 26, 2024
@cmoulliard
Copy link
Contributor Author

We should perhaps pause the inclusion of new features till we have enough "testing coverage" about the platform using Github workflows

@nimakaviani
Copy link
Contributor

whats the use case for which you need to clone the gitea repository? is it for core packages or custom packages?

@cmoulliard
Copy link
Contributor Author

whats the use case for which you need to clone the gitea repository? For every project added post creation where users would like to use argocd + gitea or even backstage + gitea etc

@Bnjoroge1
Copy link

Faced this issue as well. I fixed it by just port-forwarding from the NodePort to 22, and works fine locally. Is there a better approach to fix this in idpbuilder? Happy to look into it with some pointers!

@nabuskey
Copy link
Collaborator

I think you need to update the extraPortMappings field in kind config. We probably cannot use the default port 22 though. It needs elevated permissions and may collide with ssh service already running on the host.

@cmoulliard
Copy link
Contributor Author

We can, for sure, use a different port but then it will be needed to change the URL of the repo to git clone - https://stackoverflow.com/questions/5767850/git-on-custom-ssh-port. This is not really user friendly ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants