title: Registering to PyPi: basic auth failed
body: <p>I can't figure out how to register my project. I can login in fine at <a href="https://testpypi.python.org/pypi" rel="nofollow">https://testpypi.python.org/pypi</a> but using the same credentials at my .pypirc doesn't work.</p>
  
  <p><strong>.pypirc</strong></p>
  
  <pre><code>[distutils]
  index-servers=
      test
  
  [test]
  repository = https://testpypi.python.org/pypi
  username = &lt;username&gt;
  password = &lt;password&gt;
  </code></pre>
  
  <p><code>&lt;username&gt;</code> and <code>&lt;password&gt;</code> are replaced with the credentials I use to login manually at testpypi.</p>
  
  <p>Then I try to register my project:</p>
  
  <pre><code>python setup.py register -r test
  </code></pre>
  
  <p><strong>Output</strong></p>
  
  <pre><code>running register
  running egg_info
  writing websocket_server.egg-info/PKG-INFO
  writing top-level names to websocket_server.egg-info/top_level.txt
  writing dependency_links to websocket_server.egg-info/dependency_links.txt
  reading manifest file 'websocket_server.egg-info/SOURCES.txt'
  writing manifest file 'websocket_server.egg-info/SOURCES.txt'
  running check
  Registering myproject to https://testpypi.python.org/pypi
  Server response (401): basic auth failed
  </code></pre>
  
  <p>Any idea what is going on? I looked everywhere but there seems to be very little information on how to troubleshoot such issues.</p>