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

Switch to SSH transport #463

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

jonesbusy
Copy link
Collaborator

@jonesbusy jonesbusy commented Dec 15, 2024

The goal for this PR is to allow support for SSH transport on JGit. In order to clone and perform Git operation via SSH

This require to pass the --ssh-private-key

This is also some preparation for #460

This also add better support for #318 because the authentication is passed also during fetch command

The PR also add and integration test for the build-metadata subcommand and a Git testcontainer

The PR also fixes various bug during testing.

One example is the support of --maven-local-repo which was not cutomizable. For example on ci.jenkins.io is different and was breaking the resolution of the core module (which was installed on different location m2repo of the workspace

The option is also useful in order to run the tool were the /home/ folder is not writable (typically on container or kubernetes distribution

One improvement is that we miss hub4j/github-api#1996 in order to validate the target GH SSH keys

@jonesbusy jonesbusy mentioned this pull request Dec 16, 2024
@jonesbusy jonesbusy force-pushed the feature/ssh-transport branch 27 times, most recently from a503a05 to 51aeb53 Compare December 17, 2024 09:26
@jonesbusy
Copy link
Collaborator Author

Right now all keys are accepted https://github.com/apache/mina-sshd/blob/master/docs/client-setup.md#serverkeyverifier

We should validate againts known keys.

GitHub provide such keys via API, but it's missing on the java client

hub4j/github-api#1996

@jonesbusy jonesbusy force-pushed the feature/ssh-transport branch from 51aeb53 to b14006e Compare December 17, 2024 10:00
@gounthar
Copy link
Collaborator

gounthar commented Dec 17, 2024

You're already on it... 😉
I have not yet finished mine.

@jonesbusy jonesbusy force-pushed the feature/ssh-transport branch 9 times, most recently from 11b000c to bc80784 Compare December 17, 2024 13:47
@jonesbusy jonesbusy force-pushed the feature/ssh-transport branch from bc80784 to 466a31d Compare December 17, 2024 14:07
@jonesbusy jonesbusy marked this pull request as ready for review December 17, 2024 14:16
@jonesbusy
Copy link
Collaborator Author

PR finally green

@jonesbusy jonesbusy enabled auto-merge December 17, 2024 14:25
@jonesbusy jonesbusy disabled auto-merge December 17, 2024 14:25
@jonesbusy jonesbusy enabled auto-merge December 17, 2024 14:25
@jonesbusy jonesbusy merged commit de3e4f2 into jenkins-infra:main Dec 17, 2024
15 checks passed
@jonesbusy jonesbusy deleted the feature/ssh-transport branch December 17, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants