Struct git2::CredentialHelper [−][src]
Management of the gitcredentials(7) interface.
Fields
username: Option<String>
A public field representing the currently discovered username from configuration.
Methods
impl CredentialHelper
[src]
impl CredentialHelper
pub fn new(url: &str) -> CredentialHelper
[src]
pub fn new(url: &str) -> CredentialHelper
Create a new credential helper object which will be used to probe git's local credential configuration.
The url specified is the namespace on which this will query credentials. Invalid urls are currently ignored.
pub fn username(&mut self, username: Option<&str>) -> &mut CredentialHelper
[src]
pub fn username(&mut self, username: Option<&str>) -> &mut CredentialHelper
Set the username that this credential helper will query with.
By default the username is None
.
pub fn config(&mut self, config: &Config) -> &mut CredentialHelper
[src]
pub fn config(&mut self, config: &Config) -> &mut CredentialHelper
Query the specified configuration object to discover commands to execute, usernames to query, etc.
pub fn execute(&self) -> Option<(String, String)>
[src]
pub fn execute(&self) -> Option<(String, String)>
Execute this helper, attempting to discover a username/password pair.
All I/O errors are ignored, (to match git behavior), and this function only succeeds if both a username and a password were found
Auto Trait Implementations
impl Send for CredentialHelper
impl Send for CredentialHelper
impl Sync for CredentialHelper
impl Sync for CredentialHelper