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上的代码时,就报了这个问题,这个问题的导致原因其实也就是我们不断更换登录账户所导致的。
436 0
remote: The project you were looking for could not be found.
|
2月前
|
安全 Java API
Eclipse 打开marketplace 报PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
网上有很多解决的帖子,我这里只是记录一下方便自己查阅 主要原因是java本身需要证书 1、按导入安全证书的方法解决
478 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
325 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(解决的两种方式)
3328 0
Unable to negotiate with xx.xxx.xxxx port 22: no matching host key type found. Their offer: ssh-rsa(解决的两种方式)
【报错解决】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
2028 0
|
开发工具 数据安全/隐私保护 git
git 报错:Support for password authentication was removed. Please use a personal access token instead.
git 报错:Support for password authentication was removed. Please use a personal access token instead.
358 0
git 报错:Support for password authentication was removed. Please use a personal access token instead.
|
开发工具 git
Gitlab提交代码:You are not allowed to push code to this project.fatal: unable to access requested URL
Gitlab提交代码:You are not allowed to push code to this project.fatal: unable to access requested URL
787 0
|
Java 程序员 项目管理
记录:remote: You are not allowed to push code to this project...【亲测有效】
记录:remote: You are not allowed to push code to this project...【亲测有效】
1635 0
|
Perl
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `cocoapods`. Y...
[!] Unable to add a source with url `https://github.com/CocoaPods/Specs.git` named `cocoapods`. Y...
1205 0

热门文章

最新文章