From 52727cc88cd2452abe059e3e7f22379134c4761d Mon Sep 17 00:00:00 2001 From: Joshua Liebowitz Date: Wed, 18 Apr 2018 08:37:38 -0700 Subject: [PATCH] Credential clearing is too aggressive --- app/shared/models/git_repo.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/shared/models/git_repo.rb b/app/shared/models/git_repo.rb index 8d1c06a7..3b10258d 100644 --- a/app/shared/models/git_repo.rb +++ b/app/shared/models/git_repo.rb @@ -418,12 +418,13 @@ def unset_auth # TODO: Also auto-clean those files from time to time, on server re-launch maybe, or background worker FileUtils.rm(temporary_storage_path) if File.exist?(temporary_storage_path) - clear_credentials_command = "git config --#{credential_scope} --replace-all credential.helper \"\"" + # Disable for now, need to refine it since we're causing issues + # clear_credentials_command = "git config --#{credential_scope} --replace-all credential.helper \"\"" - # Uncomment next line if you want to debug git credential stuff, it's very noisey - # logger.debug("Clearing credentials for #{git_config.git_url} with command: #{clear_credentials_command}") - cmd = TTY::Command.new(printer: :quiet) - cmd.run(clear_credentials_command) + ## Uncomment next line if you want to debug git credential stuff, it's very noisey + ## logger.debug("Clearing credentials for #{git_config.git_url} with command: #{clear_credentials_command}") + # cmd = TTY::Command.new(printer: :quiet) + # cmd.run(clear_credentials_command) end def perform_block(use_global_git_mutex: true, &block)