예제 #1
0
        internal static void DeleteCredentials(string url)
        {
            var entry = GitManager.GitCredentials.GetEntry(url);

            if (SeletedAdapter != null)
            {
                try
                {
                    SeletedAdapter.DeleteCredentials(SeletedAdapter.FormatUrl(url));
                }
                catch (Exception e)
                {
                    Debug.LogError("There was an error while trying to remove credentials form " + GetAdapterName(SeletedAdapter));
                    Debug.LogException(e);
                }
            }

            if (entry != null)
            {
                GitManager.GitCredentials.RemoveEntry(entry);
            }
        }
예제 #2
0
        internal static void ClearCredentialPassword(string url)
        {
            var entry = GitManager.GitCredentials.GetEntry(url);

            if (SeletedAdapter != null)
            {
                try
                {
                    SeletedAdapter.DeleteCredentials(SeletedAdapter.FormatUrl(url));
                }
                catch (Exception e)
                {
                    Debug.LogError("There was an error while trying to remove credentials form " + GetAdapterName(SeletedAdapter));
                    Debug.LogException(e);
                }
            }

            if (entry != null)
            {
                entry.ClearPassword();
                entry.SetHasPassword(false);
            }
        }