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

Expose the gitea ssh port on 32222 #478

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

squidboylan
Copy link
Contributor

@squidboylan squidboylan commented Jan 24, 2025

Sets up gitea ssh to be exposed at 32222 on the host network, container, and service layers.

It's unclear to me if we always want to expose this port. If we decide the host port we can ensure the gitea SSH_PORT setting matches which makes the ssh clone URL in gitea work.

fixes #227

@squidboylan
Copy link
Contributor Author

I created my cluster with: ./idpbuilder create --host korhal
cloned the repo using:

squid@korhal:~/hacking/go/idpbuilder$ git clone ssh://[email protected]:32222/giteaAdmin/idpbuilder-localdev-argocd.git
Cloning into 'idpbuilder-localdev-argocd'...
The authenticity of host '[gitea.korhal]:32222 ([127.0.1.1]:32222)' can't be established.
RSA key fingerprint is SHA256:yE2rNfQnjblWEZkNSsX7nyJxv1e7FasJTI/M9y7CdaY.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '[gitea.korhal]:32222' (RSA) to the list of known hosts.
remote: Enumerating objects: 10, done.
remote: Counting objects: 100% (10/10), done.
remote: Compressing objects: 100% (8/8), done.
remote: Total 10 (delta 1), reused 0 (delta 0), pack-reused 0 (from 0)
Receiving objects: 100% (10/10), 67.20 KiB | 4.20 MiB/s, done.
Resolving deltas: 100% (1/1), done.

and below is what the UI shows
gitea

@jessesanford
Copy link
Contributor

I am ok with this but @cmoulliard did raise a good point in the thread on this issue about the port not matching what the references to the git repos are. I think as long as we continue to use the https urls for pulls and we just use the ssh for special purpose or edge cases then this is fine. I don't want to see a mix of references to both though. I think when we are building automation in idpbuilder or related stacks we should stick to the https. @nabuskey what do you think?

@nabuskey
Copy link
Collaborator

Looks good to me.

I think https clone / push is an easier way because you can get the token and the password (could be static password) with a idpbuilder command. We should support SSH too because there's no draw back as far as I can tell.

Sets up gitea ssh to be exposed at 32222 on the host network, docker
container, and cluster service layers.

Signed-off-by: Caleb Boylan <[email protected]>
@nabuskey
Copy link
Collaborator

/e2e

Copy link
Collaborator

@nabuskey nabuskey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nabuskey nabuskey merged commit 757fbc2 into cnoe-io:main Jan 28, 2025
5 checks passed
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

Successfully merging this pull request may close these issues.

[Bug]: Cannot git clone a gitea repository using ssh
3 participants