title: kubectl Please enter Username: error: EOF
body: <p>I started getting an error in my CI process <code>Please enter Username: error: EOF</code> when running <code>kubectl</code> commands. 
  The kubectl version matches the cluster version, and I can run the same commands fine from my machine with the same configuration shown by <code>kubectl config view</code>.</p>
  
  <p>Here are the logs:</p>
  
  <pre><code>+ kubectl config view
  apiVersion: v1
  clusters:
  - cluster:
      certificate-authority-data: DATA+OMITTED
      server: REDACTED_FOR_QUESTION
    name: REDACTED_FOR_QUESTION
  contexts:
  - context:
      cluster: REDACTED_FOR_QUESTION
      user: REDACTED_FOR_QUESTION
    name: REDACTED_FOR_QUESTION
  current-context: REDACTED_FOR_QUESTION
  kind: Config
  preferences: {}
  users:
  - name: REDACTED_FOR_QUESTION
    user:
      client-certificate-data: REDACTED
      client-key-data: REDACTED
  ++ echo 'Starting Kube proxy - port is 8001'
  ++ set +e
  ++ echo 'using kubectl'
  ++ sleep 1
  ++ kubectl proxy --port=8001
  error: EOF
  ++ cat backingfile
  ++ rm backingfile
  ++ set -e
  + echo Starting Kube proxy - port is 8001 using kubectl Please enter Username:
  Starting Kube proxy - port is 8001 using kubectl Please enter Username:
  + kubectl version
  Please enter Username: error: EOF
  Exited with code 1
  </code></pre>
  
  <p>What I am doing in my script is the following:</p>
  
  <pre><code>  echo "using kubectl"
    kubectl proxy --port=${KUBECTL_PROXY_PORT} &gt; backingfile &amp;
    sleep 1 &amp;&amp; cat backingfile &amp;&amp; rm backingfile
    set -e
  </code></pre>
  
  <p>As this allowed me to launch <code>kubectl</code> in the background but still get the logs of the command.</p>
  
  <p>What is causing this error and how can I run the command successfully again? <code>Please enter Username: error: EOF</code></p>