internal GitCredential CreateEntry(string url, string username) { GitCredential entry = gitCredentials.GetEntry(url); if (entry != null) { return(null); } entry = new GitCredential() { URL = url }; entry.SetUsername(username); gitCredentials.AddEntry(entry); return(entry); }
internal static GitCredential CreatEntry(string url, string username, string password) { GitCredential entry = gitCredentials.GetEntry(url); if (entry != null) { return(null); } entry = new GitCredential() { URL = url }; entry.SetUsername(username); gitCredentials.AddEntry(entry); if (!string.IsNullOrEmpty(password)) { SetNewPassword(url, username, password); } return(entry); }