def retrieve
      raise RetrieverError.new("git retriever is unavailable") unless available?
      private_key = @repository.first_credential
      private_key = nil if private_key && private_key.empty?
      if is_windows?
        if private_key
          with_private_key_windows(private_key) { super }
        else
          super
        end
      else
        # always start the ssh agent in Linux so we can disable strict host name
        # checking, regardless of credentials.
        ::RightScraper::Processes::SSHAgent.with do |agent|
          agent.add_key(private_key) if private_key
          super
        end
      end
      true
    end
def retrieve
      raise RetrieverError.new("git retriever is unavailable") unless available?
      private_key = @repository.first_credential
      private_key = nil if private_key && private_key.empty?
      if is_windows?
        if private_key
          with_private_key_windows(private_key) { super }
        else
          super
        end
      else
        # always start the ssh agent in Linux so we can disable strict host name
        # checking, regardless of credentials.
        ::RightScraper::Processes::SSHAgent.with do |agent|
          agent.add_key(private_key) if private_key
          super
        end
      end
      true
    end
In addition to normal retriever initialization, if the
 underlying repository has a credential we need to initialize a
 fresh SSHAgent and add the credential to it.