Skip to content

Trouble with the packaging tutorial #841

@ekohilas

Description

@ekohilas

OS version

Ubuntu

Python version

Python 3.12.0

Pip version

pip 24.3.1

Guide link

https://packaging.python.org/tutorials/packaging-projects

Problem description

The guide says to type in __token__ and enter the api key as the password, however:

  1. typing in __token__ doesn't appear on the command line
  2. the password is not asked for
  3. a 403 is returned

Error message

$ python3 -m twine upload --repository testpypi dist/* --verbose
Uploading distributions to https://test.pypi.org/legacy/
INFO     dist/example_package_ekohilas-0.0.1-py3-none-any.whl (2.7 KB)                              
INFO     dist/example_package_ekohilas-0.0.1.tar.gz (2.1 KB)                                        
INFO     Querying keyring for password                                                              
Enter your API token: 
INFO     username: __token__                                                                        
INFO     password: <hidden>                                                                         
Uploading example_package_ekohilas-0.0.1-py3-none-any.whl
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.2/6.2 kB • 00:00 • ?
INFO     Response from https://test.pypi.org/legacy/:                                               
         403 Forbidden                                                                              
INFO     <html>                                                                                     
          <head>                                                                                    
           <title>403 Invalid or non-existent authentication information. See                       
         https://test.pypi.org/help/#invalid-auth for more information.</title>                     
          </head>                                                                                   
          <body>                                                                                    
           <h1>403 Invalid or non-existent authentication information. See                          
         https://test.pypi.org/help/#invalid-auth for more information.</h1>                        
           Access was denied to this resource.<br/><br/>                                            
         Invalid or non-existent authentication information. See                                    
         https://test.pypi.org/help/#invalid-auth for more information.                             
                                                                                                    
                                                                                                    
          </body>                                                                                   
         </html>                                                                                    
ERROR    HTTPError: 403 Forbidden from https://test.pypi.org/legacy/                                
         Forbidden

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions