### Open Spotbugs GUI Source: https://github.com/jenkinsci/git-client-plugin/blob/master/CONTRIBUTING.adoc Launch the Spotbugs GUI to review the generated Spotbugs report. This is useful for examining findings in detail. ```bash mvn spotbugs:gui ``` -------------------------------- ### Configure Accept First Connection Strategy (YAML) Source: https://github.com/jenkinsci/git-client-plugin/blob/master/README.adoc Use this YAML configuration to enable the 'Accept first connection' SSH host key verification strategy. This strategy remembers the first host key encountered for a Git server. ```yaml security: gitHostKeyVerificationConfiguration: sshHostKeyVerificationStrategy: "acceptFirstConnectionStrategy" ``` -------------------------------- ### Compile and Test Plugin Source: https://github.com/jenkinsci/git-client-plugin/blob/master/CONTRIBUTING.adoc Compile and run automated tests for the plugin using Maven. Ensure Java 11 or Java 17 is used. ```bash mvn clean verify ``` -------------------------------- ### Apply Code Formatting Source: https://github.com/jenkinsci/git-client-plugin/blob/master/CONTRIBUTING.adoc Apply code formatting rules maintained by the spotless maven plugin. Run this before submitting a pull request to ensure consistent code style. ```bash mvn spotless:apply ``` -------------------------------- ### Configure Known Hosts File Strategy (YAML) Source: https://github.com/jenkinsci/git-client-plugin/blob/master/README.adoc Configure the 'Known hosts file' SSH host key verification strategy using this YAML. This strategy relies on the existing `known_hosts` file on the Jenkins controller and agents. ```yaml security: gitHostKeyVerificationConfiguration: sshHostKeyVerificationStrategy: "knownHostsFileVerificationStrategy" ``` -------------------------------- ### Run JMH Benchmarks Source: https://github.com/jenkinsci/git-client-plugin/blob/master/CONTRIBUTING.adoc Execute Java Microbenchmark Harness (JMH) benchmarks to compare command line git and JGit performance. The '-Dbenchmark.run=true' flag is required. ```bash mvn -P jmh-benchmark -Dbenchmark.run=true test ``` -------------------------------- ### Approved Host Keys Format Source: https://github.com/jenkinsci/git-client-plugin/blob/master/src/main/resources/org/jenkinsci/plugins/gitclient/verifier/ManuallyProvidedKeyVerificationStrategy/help-approvedHostKeys.html Specify allowed host keys in the format compatible with `known_hosts` file entries. Each line should contain a hostname followed by its public key. ```text github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl bitbucket.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl ``` -------------------------------- ### Run Spotbugs Analysis Source: https://github.com/jenkinsci/git-client-plugin/blob/master/CONTRIBUTING.adoc Analyze the project for potential bugs using Spotbugs. This command checks for new Spotbugs issues. ```bash mvn spotbugs:check ``` -------------------------------- ### Configure Manually Provided Keys Strategy (YAML) Source: https://github.com/jenkinsci/git-client-plugin/blob/master/README.adoc This YAML configuration sets up the 'Manually provided keys' SSH host key verification strategy. It allows administrators to specify host keys directly for Git repository servers. ```yaml security: gitHostKeyVerificationConfiguration: sshHostKeyVerificationStrategy: manuallyProvidedKeyVerificationStrategy: approvedHostKeys: |- bitbucket.org ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIazEu89wgQZ4bqs3d63QSMzYVa0MuJ2e2gKTKqu+UUO github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl gitlab.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAfuCHKVTjquxvt6CM6tdG4SLp1Btn/nOeHHE5UOzRdf ``` -------------------------------- ### Run Plugin in Jenkins Environment Source: https://github.com/jenkinsci/git-client-plugin/blob/master/CONTRIBUTING.adoc Run the plugin locally within a Jenkins environment using the maven-hpi-plugin. Specify the Jetty port. ```bash mvn -Djetty.port=8080 hpi:run ``` -------------------------------- ### Generate Code Coverage Report Source: https://github.com/jenkinsci/git-client-plugin/blob/master/CONTRIBUTING.adoc Generate a code coverage report using JaCoCo. This requires enabling the 'enable-jacoco' profile. ```bash mvn -P enable-jacoco clean install jacoco:report ``` -------------------------------- ### Configure No Verification Strategy (YAML) Source: https://github.com/jenkinsci/git-client-plugin/blob/master/README.adoc This YAML configuration disables SSH host key verification. It is not recommended due to security risks like 'man-in-the-middle' attacks. ```yaml security: gitHostKeyVerificationConfiguration: sshHostKeyVerificationStrategy: "noVerificationStrategy" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.