title: using subprocess.run to execute command, the process is blocked and never continue
body: <p>sometimes executing the following code will block. and the process does not raise the exception.
  This problem is accidental.</p>
  <pre class="lang-py prettyprint-override"><code>def execute(command):
      &quot;&quot;&quot;
      description: execute the command.
      &quot;&quot;&quot;
      cmd = &quot; &quot;.join(command)
      pattern = re.compile(r&quot;https://(.*)@&quot;)
      shield_command = re.sub(pattern, r'https://', cmd)
      server_logger.info(f&quot;execute command '{shield_command}'&quot;)
      try:
          process = subprocess.run(
              command,
              env=os.environ,
              check=True,
              encoding=&quot;utf8&quot;,
              timeout=7200,
              stdout=subprocess.PIPE,
              stderr=subprocess.PIPE
          )
      except subprocess.TimeoutExpired:
          server_logger.error(f&quot;execute command '{shield_command}' timeout.&quot;)
          return None, None
      except subprocess.CalledProcessError as exc:
          server_logger.error(f&quot;execute command error.\n {exc.stderr}&quot;)
          output, error = exc.output, exc.stderr
      except BaseException as e:
          trace_exception(e, server_logger)
          return None, None
      else:
          output = process.stdout
          error = process.stderr
  </code></pre>
  <p>the module is used to Execute git related commands to download the code。</p>
  <p>when I  download the code at the first time, the executed command is :</p>
  <pre><code>git config --global http.sslVerify false
  git clone url(a valid link) workspace(a valid path) -b master
  </code></pre>
  <p>at the second time, the executed command is:</p>
  <pre><code>git config --global http.sslVerify false 
  git checkout master
  git reset --hard HEAD
  git pull
  </code></pre>
  <p>but sometimes when executing the command <code>git config --global http.sslVerify false</code>, it block.
  I don't know the reason. please help me.</p>