Default StrictHostKeyChecking to true (#630)

* defaulted strict host key checking to true and updated test
This commit is contained in:
Chris Fraser
2017-02-07 13:51:56 -05:00
committed by Spencer Gibb
parent 9094984b76
commit b68a3eba6b
2 changed files with 2 additions and 2 deletions

View File

@@ -71,7 +71,7 @@ public class AbstractScmAccessor implements ResourceLoaderAware {
/**
* Reject incoming SSH host keys from remote servers not in the known host list.
*/
private boolean strictHostKeyChecking;
private boolean strictHostKeyChecking = true;
/**
* Search paths to use within local working copy. By default searches only the root.
*/

View File

@@ -600,7 +600,7 @@ public class JGitEnvironmentRepositoryTests {
JGitEnvironmentRepository envRepository = new JGitEnvironmentRepository(this.environment);
envRepository.setUri(uri);
envRepository.setBasedir(new File("./mybasedir"));
envRepository.setStrictHostKeyChecking(true);
assertTrue(envRepository.isStrictHostKeyChecking());
envRepository.setCloneOnStart(true);
try {
// this will throw but we don't care about connecting.