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

[SCM-995] Upgrade JGit to 5.13.1 and leverage Apache Mina SSHD instead of JSch #153

Merged
merged 1 commit into from
Jul 19, 2022

Conversation

kwin
Copy link
Member

@kwin kwin commented Jul 8, 2022

This supports OpenSSH private keys and drops usage of unmaintained JSch

@kwin kwin force-pushed the feature/update-jgit-to-5.13.1 branch from 0b056a6 to ee650d9 Compare July 8, 2022 07:55
@kwin kwin force-pushed the feature/update-jgit-to-5.13.1 branch 6 times, most recently from 7064322 to a9b210e Compare July 12, 2022 12:43
Copy link
Member

@michael-o michael-o left a comment

Choose a reason for hiding this comment

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

Please move the env var handling to a separate JIRA issue/PR.

@kwin
Copy link
Member Author

kwin commented Jul 17, 2022

I need it for the IT.

@michael-o
Copy link
Member

michael-o commented Jul 17, 2022

Since the title of this PR is different to the JIRA issue, I have the following understanding:

  • It is hard to split apart to due to inter-PR dependencies
  • You need to upgrade JGit for OpenSSH style key format

My proposal w/o ripping this apart:

  • Create three issues: (issue a) Upgrade JGit to XXX, (issue b) rework OpenSSH private key handing for gitexe and jgit providers, (issue c) Support alternative SSH private keys with gitexe provider
  • Issue a will depend on issue b
  • Issue b will do all the hard work with proper description
  • SCM-945 will depend on issue b
  • Issue c depends on issue b

Thus, all requirements/changes are visible and understood. Then I'd merge this as one PR.

WDYT?

@kwin
Copy link
Member Author

kwin commented Jul 17, 2022

  • Create three issues: (issue a) Upgrade JGit to XXX, (issue b) rework OpenSSH private key handing for gitexe and jgit providers, (issue c) Support alternative SSH private keys with gitexe provider

This PR does not "rework OpenSSH private key handing for gitexe" nor does it "Support alternative SSH private keys with gitexe provider". The environment variables are only necessary to test existing functionality in gitexe (namely test authorization with SSH).

@michael-o
Copy link
Member

  • Create three issues: (issue a) Upgrade JGit to XXX, (issue b) rework OpenSSH private key handing for gitexe and jgit providers, (issue c) Support alternative SSH private keys with gitexe provider

This PR does not "rework OpenSSH private key handing for gitexe" nor does it "Support alternative SSH private keys with gitexe provider". The environment variables are only necessary to test existing functionality in gitexe (namely test authorization with SSH).

Please summarize what is necessary to make this proper.

@kwin
Copy link
Member Author

kwin commented Jul 17, 2022

Maybe split up into
a) update JGit
b) add credentials provider for JGit
c) add IT for SSH authentication during git clone (both git providers)

Then the environment variable would belong to c)

@michael-o
Copy link
Member

Maybe split up into a) update JGit b) add credentials provider for JGit c) add IT for SSH authentication during git clone (both git providers)

Then the environment variable would belong to c)

That sounds good, though advertising that gitexe supports alternative SSH private keys would we that bad, no? Especially in consistency with JGit. WDYT?

@kwin
Copy link
Member Author

kwin commented Jul 17, 2022

git executable leverages the ssh executable for authentication and therefore there is no change with regard to supported private keys formats

@michael-o
Copy link
Member

git executable leverages the ssh executable for authentication and therefore there is no change with regard to supported private keys formats

That's not what I mean, I mean that you can now supply an expliclt key which wasn't supported by now. Of course, the format and transport won't change.

@kwin
Copy link
Member Author

kwin commented Jul 17, 2022

I mean that you can now supply an expliclt key which wasn't supported by now

This is not part of this PR either. I will provide one for that separately.

@michael-o
Copy link
Member

michael-o commented Jul 17, 2022

I mean that you can now supply an expliclt key which wasn't supported by now

This is not part of this PR either. I will provide one for that separately.

Sorry, I guess my brain isn't really working today. Please continue I'll try to catch up tomorrow.

@kwin kwin force-pushed the feature/update-jgit-to-5.13.1 branch from a9b210e to ee650d9 Compare July 18, 2022 07:01
@kwin kwin marked this pull request as draft July 18, 2022 07:04
@kwin kwin force-pushed the feature/update-jgit-to-5.13.1 branch from ee650d9 to 461d9c8 Compare July 18, 2022 07:23
@kwin kwin marked this pull request as ready for review July 18, 2022 07:25
@kwin
Copy link
Member Author

kwin commented Jul 18, 2022

I split the features up as proposed in #153 (comment). This is now only a), b) is at https://github.com/apache/maven-scm/pull/154/files. and c) is still outstanding.

@kwin kwin requested a review from michael-o July 18, 2022 07:29
@michael-o
Copy link
Member

I split the features up as proposed in #153 (comment). This is now only a), b) is at https://github.com/apache/maven-scm/pull/154/files. and c) is still outstanding.

Fantastic, will review today.

@michael-o michael-o self-requested a review July 19, 2022 18:00
@michael-o michael-o force-pushed the feature/update-jgit-to-5.13.1 branch from 14e6517 to acb585f Compare July 19, 2022 18:14
@michael-o michael-o changed the title [SCM-945] Update to JGit 5.13.1 leveraging Apache Mina SSHD [SCM-995] Upgrade JGit to 5.13.1 and leverage Apache Mina SSHD instead of JSch Jul 19, 2022
@asfgit asfgit merged commit acb585f into apache:master Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants