         }
         if Defaults[.gitRepositoryAuthenticationMethod] == "Password" {
             gitCredential = GitCredential(credential: GitCredential.Credential.http(userName: Defaults[.gitRepositoryUsername], password: Defaults[.gitRepositoryPassword]))
+        } else if Defaults[.gitRepositoryAuthenticationMethod] == "SSH Key"{
+            gitCredential = GitCredential(credential: GitCredential.Credential.ssh(userName: Defaults[.gitRepositoryUsername], password: Defaults[.gitRepositorySSHPrivateKeyPassphrase]!, publicKeyFile: Globals.shared.sshPublicKeyPath, privateKeyFile: Globals.shared.sshPrivateKeyPath))
         } else {
-            gitCredential = GitCredential(credential: GitCredential.Credential.ssh(userName: Defaults[.gitRepositoryUsername], password: Defaults[.gitRepositorySSHPrivateKeyPassphrase]!, publicKeyFile: Globals.shared.sshPublicKeyPath, privateKeyFile: Globals.shared.sshPrivateKeyPath))
+            gitCredential = nil
         }
         
     }

        print("pullRepoisitory")
        do {
            print("start pulling...")
            let credentialProvider = try gitCredential.credentialProvider()
            let options: [String: Any] = [
                GTRepositoryRemoteOptionsCredentialProvider: credentialProvider
            ]

    
    let storeURL = URL(fileURLWithPath: "\(Globals.shared.documentPath)/password-store")
    var storeRepository: GTRepository?
    var gitCredential: GitCredential?
    
    let pgp: ObjectivePGP = ObjectivePGP()
    
