rochacbruno/python-project-template

Github actions PYPI_API_TOKEN not working for me

Open

#21 geöffnet am 20. Juni 2022

Auf GitHub ansehen
 (7 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Makefile (184 Forks)github user discovery
bughelp wanted

Repository-Metriken

Stars
 (1.224 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

Describe the bug Hello Thanks for your awesome template! Everything from your template is working fine,. I have only two problems: one with writing VERSION number on MACOSX (see other issue) and one with github workflows for the release. Maybe I do it wrong. GitHub actions crashes at the end of the release.yaml.

Uploading checkatlas-0.0.8-py3-none-any.whl
25l
  0%━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━0.0/36.5 kB • --:-- • ?
  0%━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━0.0/36.5 kB • --:-- • ?
100%━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━36.5/36.5 kB • 00:00 • 32.1 MB/s
100%━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━36.5/36.5 kB • 00:00 • 32.1 MB/s
25hINFO     Response from https://upload.pypi.org/legacy/:
         403 Invalid or non-existent authentication information. See            
        [ https://pypi.org/help/#inv](https://pypi.org/help/#invalid-auth)alid-auth for more information.      
INFO     <html>                                                                 
          <head>                                                                
           <title>403 Invalid or non-existent authentication information. See   
        [ https://pypi.org/help/#inv](https://pypi.org/help/#invalid-auth)alid-auth for more information.</titl
          </head>                                                               
          <body>                                                                
           <h1>403 Invalid or non-existent authentication information. See      
        [ https://pypi.org/help/#inv](https://pypi.org/help/#invalid-auth)alid-auth for more information.</h1> 
           Access was denied to this resource.<br/><br/>                        
         Invalid or non-existent authentication information. See                
        [ https://pypi.org/help/#inv](https://pypi.org/help/#invalid-auth)alid-auth for more information.      
          </body>                                                               
         </html>                                                                
ERROR    HTTPError: 403 Forbidden from https://upload.pypi.org/legacy/
         Invalid or non-existent authentication information. See                
        [ https://pypi.org/help/#inv](https://pypi.org/help/#invalid-auth)alid-auth for more information.

This is with no doubt an error because it cannot connect to PyPi. If I run it manually with my PyPi account, everything works fine.

python setup.py sdist bdist_wheel
twine upload --verbose dist/*

I created a github secrets from PyPi and add it in GitHub. I did not touch the end of release.yaml

- name: Build and publish
      env:
        TWINE_USERNAME: __token__
        TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
      run: |
        python setup.py sdist bdist_wheel
        twine upload --verbose dist/*

Am I supposed to modify the token variable ? Thanks !

Contributor Guide