diff options
author | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-10-14 23:26:25 +0300 |
---|---|---|
committer | Marius Ungureanu <marius.ungureanu@xamarin.com> | 2015-10-15 17:56:30 +0300 |
commit | d11fee3f9bdc094f8c76e81d482af56895587bac (patch) | |
tree | a38f6bc00b64900c210ea936d4b6cf5e7ae6c159 /main/src/addins/VersionControl | |
parent | 87732341a1e83240c50491c0001369c6bdc9aa0c (diff) |
[Git] Disable agent support on El Capitan+.
The socket variable is getting reset and there's no valid error path we
can check.
Diffstat (limited to 'main/src/addins/VersionControl')
-rw-r--r-- | main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitCredentials.cs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitCredentials.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitCredentials.cs index f6aaa17013..9c9dfde998 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitCredentials.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl.Git/MonoDevelop.VersionControl.Git/GitCredentials.cs @@ -78,6 +78,12 @@ namespace MonoDevelop.VersionControl.Git } } + static bool SshAgentSupported (GitCredentialsState state) + { + return !state.AgentUsed && + (Platform.IsLinux || (Platform.IsMac && MacSystemInformation.OsVersion >= MacSystemInformation.ElCapitan)); + } + public static Credentials TryGet (string url, string userFromUrl, SupportedCredentialTypes types, GitCredentialsType type) { bool result = true; @@ -108,7 +114,7 @@ namespace MonoDevelop.VersionControl.Git cred = new UsernamePasswordCredentials (); else { // Try ssh-agent on Linux. - if (!Platform.IsWindows && !state.AgentUsed) { + if (SshAgentSupported (state)) { bool agentUsable; if (!state.AgentForUrl.TryGetValue (url, out agentUsable)) state.AgentForUrl [url] = agentUsable = true; |