1. Tarek Ziadé
  2. distribute
  3. Issues
Issue #250 resolved

Error: Upload failed (401) (regression)

Jason R. Coombs
created an issue

Sometime between 0.6.21 and the code tagged as 0.6.23, the upload command no longer works. I have a .pypirc with a username and password for pypi, but when I attempt an upload, I get the following error:

{{{ Upload failed (401): You must be identified to edit package information }}}

If I roll back to 0.6.21, the upload completes as expected. Note also that 0.6.22 was never tagged.

Comments (8)

  1. Guy Rozendorn

    Jason, can you please attach your .pypi file to this ticket (after deleting the password)? Its working for me. My .pypirc file looks like this:

    [distutils]
    index-servers =
        pypi
        local
    
    [local]
    repository: <some index server in our intranet>
    username: pypi
    password: <password>
    
    [pypi]
    repository: http://www.python.org/pypi
    username: guyr
    password: <password>
    
    

    Thanks, Guy

  2. Jason R. Coombs reporter

    Mine looks like this:

    [server-login]
    username=jason.coombs
    password=*omitted*
    
    [distutils]
    index-servers =
        pypi
        contoso
    
    [pypi]
    username: jaraco
    password: *omitted*
    
    [contoso]
    repository: https://cheese.contoso.com
    username: jason.coombs
    password: *omitted*
    

    My guess, based on the changelog, is that the lack of a repository for [pypi] is the cause. Since older versions supported a .pypirc without the repository (and defaulted to http://pypi.python.org/pypi), I would think distutils 0.6 should always support that format. At there very least, there should be interim releases that output warnings about an upcoming requirement for the repository setting, and a better error message should be output when the setting is eventually required and isn't present.

    What's the reason the repository should be specified in each .pypirc? It seems like the pypi is an excellent default if the repository isn't specified.

  3. Log in to comment