assert task.getServerUrl() != null;
String resourceKey = null;
if (task.getProjectContext() != null) {
resourceKey = task.getProjectContext().getProjectKey();
}
UserCredentials auth = authenticationRepository.getAuthentication(task.getServerUrl(), resourceKey);
if (auth == null) {
auth = AuthDialog.showAuthDialog(WindowManager.getDefault().getMainWindow());
}
if (auth != null) {
willRetry = true;