Skip to content

ssh instead of https URL in setup.cfg #350

Description

@f-hafner

Issue

When uploading the package to PyPI, I get the following error:

INFO     Using configuration from /home/flavio/.pypirc                                                                                                                       
Uploading distributions to https://test.pypi.org/legacy/
INFO     dist/sirup-0.1.0-py3-none-any.whl (14.5 KB)                                                                                                                         
INFO     dist/sirup-0.1.0.tar.gz (19.4 KB)                                                                                                                                   
INFO     username set from config file                                                                                                                                       
INFO     Querying keyring for password                                                                                                                                       
Enter your password: 
INFO     username: fhafner                                                                                                                                                   
INFO     password: <hidden>                                                                                                                                                  
Uploading sirup-0.1.0-py3-none-any.whl
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 26.6/26.6 kB • 00:00 • 96.3 MB/s
INFO     Response from https://test.pypi.org/legacy/:                                                                                                                        
         400 'git@github.com:ivory-tower-private-power/sirup' is an invalid value for Home-Page. Error: Invalid URI See                                                      
         https://packaging.python.org/specifications/core-metadata for more information.                                                                                     
INFO     <html>                                                                                                                                                              
          <head>                                                                                                                                                             
           <title>400 'git@github.com:ivory-tower-private-power/sirup' is an invalid value for Home-Page. Error: Invalid URI See                                             
         https://packaging.python.org/specifications/core-metadata for more information.</title>                                                                             
          </head>                                                                                                                                                            
          <body>                                                                                                                                                             
           <h1>400 'git@github.com:ivory-tower-private-power/sirup' is an invalid value for Home-Page. Error: Invalid URI See                                                
         https://packaging.python.org/specifications/core-metadata for more information.</h1>                                                                                
           The server could not comply with the request since it is either malformed or otherwise incorrect.<br/><br/>                                                       
         &#x27;git@github.com:ivory-tower-private-power/sirup&#x27; is an invalid value for Home-Page. Error: Invalid URI See                                                
         https://packaging.python.org/specifications/core-metadata for more information.                                                                                     
                                                                                                                                                                             
                                                                                                                                                                             
          </body>                                                                                                                                                            
         </html>                                                                                                                                                             
ERROR    HTTPError: 400 Bad Request from https://test.pypi.org/legacy/                                                                                                       
         'git@github.com:ivory-

The problem is that in dist/*.whl/*dist-info/METADATA (that is generated when running python -m build), Home-page should be the https address and not the ssh address of the github repository with the source code.

Solution

I solved the problem in setup.cfg by replacing the ssh address to the github repository with the https address to the repository, both for url and for Bug Tracker in project_urls. I don't know what needs to be fixed in the template though.

Further information

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    generated-packageRelated to the generated package, i.e. after running cookiecutter

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions