-
Notifications
You must be signed in to change notification settings - Fork 280
Added support for git_cred_ssh_key_memory_new GTCredentials #507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added +[GTCredential credentialWithUserName:publicKeyString:privateKeyString:passphrase:error:] to support libgit2 git_cred_ssh_key_memory_new() credentials.
@@ -74,6 +74,18 @@ NS_ASSUME_NONNULL_BEGIN | |||
/// Return a new GTCredential instance, or nil if an error occurred | |||
+ (nullable instancetype)credentialWithUserName:(NSString *)userName publicKeyURL:(nullable NSURL *)publicKeyURL privateKeyURL:(NSURL *)privateKeyURL passphrase:(nullable NSString *)passphrase error:(NSError **)error; | |||
|
|||
/// Create a credential object from a SSH keyfile data string | |||
/// | |||
/// userName - The username to authenticate as. Must not be nil. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Happily I think we can stop writing nil
ability in the comments, since nullable
indicates it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree; but I tried to follow whatever was in the similar function above :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's always the best route to take! But happily standards change.
This looks great, thanks! Just a couple nits to pick. |
Fixed indentation on one of the lines (was a tad off); Removed references to nilability as nullable keyword indicates that. Didn't touch other functions I didn't author.
There you go. :) |
🤘 |
Added support for git_cred_ssh_key_memory_new GTCredentials
Added +[GTCredential credentialWithUserName:publicKeyString:privateKeyString:passphrase:error:] to support libgit2 git_cred_ssh_key_memory_new() credentials.