Skip to content
This repository has been archived by the owner on Sep 6, 2022. It is now read-only.

Commit

Permalink
Credential clearing is too aggressive
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua Liebowitz committed Apr 18, 2018
1 parent 35411ed commit 52727cc
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions app/shared/models/git_repo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 52727cc

Please sign in to comment.