Skip to content

Expose the gitea ssh port on 32222#478

Merged
nabuskey merged 1 commit intocnoe-io:mainfrom
squidboylan:gitea-ssh-clone
Jan 28, 2025
Merged

Expose the gitea ssh port on 32222#478
nabuskey merged 1 commit intocnoe-io:mainfrom
squidboylan:gitea-ssh-clone

Conversation

@squidboylan
Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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

squid@korhal:~/hacking/go/idpbuilder$ git clone ssh://git@gitea.korhal: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
Copy Markdown
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
Copy Markdown
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 <calebboylan@gmail.com>
@nabuskey
Copy link
Copy Markdown
Collaborator

/e2e

Copy link
Copy Markdown
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
cmoulliard pushed a commit to ch007m/fork-idpbuilder that referenced this pull request Mar 13, 2025
Signed-off-by: Caleb Boylan <calebboylan@gmail.com>
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