AuthData (@NotNull String url, @Nullable String username, boolean editableUsername) { Map<String, InteractiveGitHttpAuthDataProvider> providers = new HashMap<>(); for (GitRepositoryHostingService service : GitRepositoryHostingService.EP_NAME.getExtensionList()) { InteractiveGitHttpAuthDataProvider provider = editableUsername || username == null ? service.getInteractiveAuthDataProvider(myProject, url) : service.getInteractiveAuthDataProvider(myProject, url, username); if (provider != null) providers.put(service.getServiceDisplayName(), provider); } GitHttpLoginDialog dialog = showAuthDialog(UriUtil.splitScheme(url).second, username, editableUsername, providers); LOG.debug("Showed dialog:" + (dialog.isOK() ? "OK" : "Cancel")); if (!dialog.isOK()) { myCancelled = true; if (dialog.getExitCode() == GitHttpLoginDialog.USE_CREDENTIAL_HELPER_CODE) { LOG.debug("Credential helper is enabled"); GitVcsApplicationSettings.getInstance().setUseCredentialHelper(true); throw new CredentialHelperShouldBeUsedException(); } throw new ProcessCanceledException(); } myPasswordSafeDelegate.setRememberPassword(dialog.getRememberPassword()); AuthData sessionAuthData = dialog.getExternalAuthData(); if (sessionAuthData != null) { myDataForSession = true; return sessionAuthData; } AuthData authData = new AuthData(dialog.getUsername(), dialog.getPassword()); myPasswordSafeDelegate.setData(authData); myPasswordSafeDelegate.savePassword(url); return authData; }