aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt
diff options
context:
space:
mode:
authorFabian Henneke <FabianHenneke@users.noreply.github.com>2020-05-28 06:27:30 +0200
committerGitHub <noreply@github.com>2020-05-28 09:57:30 +0530
commit97911c587754a7c11e594004b77c4ac53af8a468 (patch)
tree680453c63fc3873139a3937268f73ec6985cf03a /app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt
parentfea82fed47d87138a9a24eb0358fc9a917474dc7 (diff)
downloadHardenedPass-97911c587754a7c11e594004b77c4ac53af8a468.tar.gz
HardenedPass-97911c587754a7c11e594004b77c4ac53af8a468.zip
Use SSHJ for SSH public key authentication (#801)
Diffstat (limited to 'app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt')
-rw-r--r--app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt31
1 files changed, 3 insertions, 28 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt b/app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt
index 32421d38..705566be 100644
--- a/app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt
+++ b/app/src/main/java/com/zeapo/pwdstore/git/CloneOperation.kt
@@ -34,43 +34,18 @@ class CloneOperation(fileDir: File, callingActivity: Activity) : GitOperation(fi
return this
}
- /**
- * sets the authentication for user/pwd scheme
- *
- * @param username the username
- * @param password the password
- * @return the current object
- */
- public override fun setAuthentication(username: String, password: String): CloneOperation {
- super.setAuthentication(username, password)
- return this
- }
-
- /**
- * sets the authentication for the ssh-key scheme
- *
- * @param sshKey the ssh-key file
- * @param username the username
- * @param passphrase the passphrase
- * @return the current object
- */
- public override fun setAuthentication(sshKey: File, username: String, passphrase: String): CloneOperation {
- super.setAuthentication(sshKey, username, passphrase)
- return this
- }
-
override fun execute() {
(this.command as? CloneCommand)?.setCredentialsProvider(this.provider)
GitAsyncTask(callingActivity, false, this, Intent()).execute(this.command)
}
- override fun onError(errorMessage: String) {
- super.onError(errorMessage)
+ override fun onError(err: Exception) {
+ super.onError(err)
MaterialAlertDialogBuilder(callingActivity)
.setTitle(callingActivity.resources.getString(R.string.jgit_error_dialog_title))
.setMessage("Error occurred during the clone operation, " +
callingActivity.resources.getString(R.string.jgit_error_dialog_text) +
- errorMessage +
+ err.message +
"\nPlease check the FAQ for possible reasons why this error might occur.")
.setPositiveButton(callingActivity.resources.getString(R.string.dialog_ok)) { _, _ -> }
.show()