please verify at least one address before registering a new project on PyPI.

简介: please verify at least one address before registering a new project on PyPI.

今天新封装了一个改变pycharm控制台颜色的pypi包:consolecolor

一路过坑,最后成功上传

https://pypi.python.org/pypi/consolecolor/0.0.1

image.png



问题的发生与解决

第一次尝试

按照我之前的套路,一步一步来:


原文:Python编程:为世界贡献你的轮子-pipy打包


输入指令:


python setup.py sdist upload


不出所料,成功报错,


Upload failed (403): Invalid or non-existent authentication information.


上次上传是:2018年03月19日,才一个月不到,竟然这么多麻烦。


第二次尝试

我以为是账号密码不对,

百度后参考: 发布你自己的轮子 - PyPI打包上传实践

说是~/.pypirc文件配置不对,开始各种修改,当然,还是不对


第三次尝试

继续百度: python打包代码上传PYPI出现错误500,虚心求教


这里我第一次看到 twine包,好吧

根据提示提示跳转到了官网:Uploading your Project to PyPI

换种方式继续尝试


pip install twine
twine upload dist/*

twine上传pypi包报错如下:

image.png


输入报错:权限验证失败


HTTPError: 403 Client Error: Invalid or non-existent authentication information. 
for url: https://upload.pypi.org/legacy/

第四次尝试

我删除~/.pypirc文件后,采用输入账号密码的方式,继续试


HTTPError: 400 Client Error: User 'mouday' has no verified email addresses, 
please verify at least one address before registering a new project on PyPI. 
See https://upload.pypi.org/help/#verified-email for more information.
for url: https://upload.pypi.org/legacy/

里边提到需要验证邮箱地址,按照报错提示打开连接,完全没有验证邮箱的提示,打开 pypi 后台也没有找到验证邮箱的地方,一脸懵逼。。。


第五次尝试

最后找到stackoverflow:verified-email-addresses-while-push


Alright, I figured out:
You need to login to https://pypi.org/
instead of the old https://pypi.python.org/pypi.
https://pypi.org shows a "pre-production" warning on top, but that doesn't matter.
Login to your account, go to account setting, and verify your email. 
The old site doesn't have a way to check whether your email is verified or not.

大概意思就是你要访问:重点 https://pypi.org/ 验证你的邮箱,打开连接之后,正常登陆 pypi 账号,找到下面 options 发送一份确认邮件,点击收到的邮件的确认连接,确认一下就行。

image.png



最后提交成功


总结

此次的关键点在于验证 pypi 邮箱 https://pypi.org/


验证完就很简单了:


# 第一步,安装twine
pip install twine 
# 第二步,创建setup.py文件,见参考文章[1]
# 第三步,打包
python setup.py sdist
# 第四步,上传,根据提示数据用户名和密码,也可以配置 $HOME/.pypirc 文件
twine upload dist/*

参考:


Python编程:为世界贡献你的轮子-pipy打包

Python3 上传Python包到PyPi

发布你自己的轮子 - PyPI打包上传实践

python打包代码上传PYPI出现错误500,虚心求教

Uploading your Project to PyPI


HTTPError: 400 client Error: user ‘x’ has no verified email addresses while pushing python package to pypi

相关文章
|
开发工具 数据安全/隐私保护 git
remote: The project you were looking for could not be found.
因为使用了不同的账号对不同的项目进行登录,在更换回原先的账户下载git上的代码时,就报了这个问题,这个问题的导致原因其实也就是我们不断更换登录账户所导致的。
557 0
remote: The project you were looking for could not be found.
|
7月前
|
安全 Java API
Eclipse 打开marketplace 报PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
网上有很多解决的帖子,我这里只是记录一下方便自己查阅 主要原因是java本身需要证书 1、按导入安全证书的方法解决
835 0
Eclipse 打开marketplace 报PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
|
IDE Shell 网络安全
Visual Studio 2022 git error Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa
Visual Studio 2022 git error Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa
407 0
Visual Studio 2022 git error Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa
|
网络安全 开发工具 git
Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解决的两种方式)
Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解决的两种方式)
3831 0
Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解决的两种方式)
|
1月前
|
存储 网络安全
Curl error (60): SSL peer certificate or SSH remote key was not OK for https://update.cs2c.com.cn/NS/V10/V10SP2/os/adv/lic/base/x86_64/repodata/repomd.xml [SSL: no alternative certificate subject name matches target host name 'update.cs2c.com.cn']
【10月更文挑战第30天】在尝试从麒麟软件仓库(ks10-adv-os)下载元数据时,遇到 SSL 证书验证问题。错误提示为:`Curl error (60): SSL peer certificate or SSH remote key was not OK`。可能原因包括证书不被信任、证书与域名不匹配或网络问题。解决方法包括检查网络连接、导入 SSL 证书、禁用 SSL 证书验证(不推荐)、联系仓库管理员、检查系统时间和尝试其他镜像。
166 1
|
2月前
|
数据安全/隐私保护
github报错(完美解决):获取token。remote: Support for password authentication was removed on August 13, 2021.
这篇文章介绍了如何在GitHub上解决因密码认证被移除而导致的推送错误,通过创建和使用个人访问令牌(token)来代替密码进行身份验证。
332 0
|
5月前
|
安全 Python
【Python】已完美解决:WARNING: The repository located at mirrors .aliyun.com is not a trusted or secure host
【Python】已完美解决:WARNING: The repository located at mirrors .aliyun.com is not a trusted or secure host
320 1
|
7月前
|
网络虚拟化
WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being i
WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being i
WARNING: The repository located at mirrors.aliyun.com is not a trusted or secure host and is being i
【报错解决】ERROR: pip‘s dependency resolver does not currently take into account all the packages
【报错解决】ERROR: pip‘s dependency resolver does not currently take into account all the packages
2908 0