-
Notifications
You must be signed in to change notification settings - Fork 317
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
fix(Git): Work around a bug with JGit vs MINA #9856
Conversation
@bennati does this fix your use-case? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #9856 +/- ##
=========================================
Coverage 68.12% 68.12%
Complexity 1292 1292
=========================================
Files 250 250
Lines 8840 8840
Branches 917 917
=========================================
Hits 6022 6022
Misses 2431 2431
Partials 387 387
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@@ -104,6 +104,9 @@ class Git( | |||
) : VersionControlSystem() { | |||
companion object { | |||
init { | |||
// Work around a bug in Apache MINA sshd, see https://github.com/eclipse-jgit/jgit/issues/135. | |||
System.setProperty("java.security.egd", "file:/dev/./urandom") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this only be executed if the OS is Linux?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, done, and added an explanation to the commit message.
Also see [1] for some more background information about why SSH connections can otherwise block "if there is less entropy available than requested". As a safety measure, this is only done on Linux to not cause any unintended slow-down on Windows, also see [2]. [1]: https://stackoverflow.com/a/59097932/1127485 [2]: https://www.baeldung.com/java-security-egd#testing-the-effect-of-javasecurityegd Signed-off-by: Sebastian Schuberth <[email protected]>
7eff0db
to
b4f6769
Compare
Merging this early for the release as previous checks passed and only a trivial condition (famous last words) was added. |
Also see 1 for some more background information about why SSH connections can otherwise block "if there is less entropy available than requested".