diff --git a/android/app/build.gradle b/android/app/build.gradle index de5c36bd..84e0ae74 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -98,10 +98,6 @@ dependencies { androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' - implementation('org.eclipse.jgit:org.eclipse.jgit:3.7.1.201504261725-r') - { - exclude group: 'org.apache.httpcomponents', module: 'httpclient' - } implementation 'com.jcraft:jsch:0.1.54' // For reading a file to string diff --git a/android/app/src/main/java/io/gitjournal/gitjournal/CustomSshSessionFactory.java b/android/app/src/main/java/io/gitjournal/gitjournal/CustomSshSessionFactory.java deleted file mode 100644 index b87c0296..00000000 --- a/android/app/src/main/java/io/gitjournal/gitjournal/CustomSshSessionFactory.java +++ /dev/null @@ -1,57 +0,0 @@ -package io.gitjournal.gitjournal; - -import android.util.Log; - -import com.jcraft.jsch.JSch; -import com.jcraft.jsch.JSchException; -import com.jcraft.jsch.Session; - -import org.eclipse.jgit.transport.JschConfigSessionFactory; -import org.eclipse.jgit.transport.OpenSshConfig; -import org.eclipse.jgit.util.FS; - -public class CustomSshSessionFactory extends JschConfigSessionFactory { - private String privateKeyPath; - - public CustomSshSessionFactory(String privateKeyPath_) { - privateKeyPath = privateKeyPath_; - } - - protected void configure(OpenSshConfig.Host host, Session session) { - session.setConfig("StrictHostKeyChecking", "no"); - } - - protected JSch createDefaultJSch(FS fs) throws JSchException { - - class MyLogger implements com.jcraft.jsch.Logger { - java.util.Hashtable name; - - MyLogger() { - name = new java.util.Hashtable(); - name.put(new Integer(DEBUG), "DEBUG: "); - name.put(new Integer(INFO), "INFO: "); - name.put(new Integer(WARN), "WARN: "); - name.put(new Integer(ERROR), "ERROR: "); - name.put(new Integer(FATAL), "FATAL: "); - } - - public boolean isEnabled(int level) { - return false; - } - - public void log(int level, String message) { - System.err.print(name.get(new Integer(level))); - System.err.println(message); - } - } - JSch.setLogger(new MyLogger()); - - JSch defaultJSch = super.createDefaultJSch(fs); - defaultJSch.addIdentity(privateKeyPath); - - JSch.setConfig("PreferredAuthentications", "publickey"); - - Log.d("identityNames", defaultJSch.getIdentityNames().toString()); - return defaultJSch; - } -}