Enable RSA4096 subkey and clone
This commit is contained in:
parent
f4f038375b
commit
7f6e3f1909
4 changed files with 114 additions and 23 deletions
|
|
@ -12,25 +12,25 @@ import ObjectiveGit
|
|||
@testable import passKit
|
||||
|
||||
class PasswordStoreTest: XCTestCase {
|
||||
// let cloneOptions: [String : GTCredentialProvider] = {
|
||||
// let credentialProvider = GTCredentialProvider { (_, _, _) -> (GTCredential?) in
|
||||
// try? GTCredential(userName: "", password: "")
|
||||
// }
|
||||
// return [GTRepositoryCloneOptionsCredentialProvider: credentialProvider]
|
||||
// }()
|
||||
// let remoteRepoURL = URL(string: "git://localhost/")!
|
||||
//
|
||||
// func testClone() throws {
|
||||
// let url = URL(fileURLWithPath: "\(Globals.repositoryPath)-test")
|
||||
// let passwordStore = PasswordStore(url: url)
|
||||
//
|
||||
// try passwordStore.cloneRepository(
|
||||
// remoteRepoURL: remoteRepoURL,
|
||||
// options: cloneOptions,
|
||||
// branchName: "master",
|
||||
// transferProgressBlock: { _, _ in },
|
||||
// checkoutProgressBlock: { _, _, _ in }
|
||||
// )
|
||||
// passwordStore.erase()
|
||||
// }
|
||||
let cloneOptions: [String : GTCredentialProvider] = {
|
||||
let credentialProvider = GTCredentialProvider { (_, _, _) -> (GTCredential?) in
|
||||
try? GTCredential(userName: "", password: "")
|
||||
}
|
||||
return [GTRepositoryCloneOptionsCredentialProvider: credentialProvider]
|
||||
}()
|
||||
let remoteRepoURL = URL(string: "https://github.com/mssun/passforios-password-store.git")!
|
||||
|
||||
func testClone() throws {
|
||||
let url = URL(fileURLWithPath: "\(Globals.repositoryPath)-test")
|
||||
let passwordStore = PasswordStore(url: url)
|
||||
|
||||
try passwordStore.cloneRepository(
|
||||
remoteRepoURL: remoteRepoURL,
|
||||
options: cloneOptions,
|
||||
branchName: "master",
|
||||
transferProgressBlock: { _, _ in },
|
||||
checkoutProgressBlock: { _, _, _ in }
|
||||
)
|
||||
passwordStore.erase()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue