PyPI 引入“可信发布”机制

1,307次阅读
没有评论

PyPI 官方宣布,从今天开始他们引入了‘Trusted Publishers’(可信发布)机制,PyPI 包维护者可以采用一种新的、更安全的发布方法,不需要与外部系统共享长期密码或 API 令牌。

PyPI 引入“可信发布”机制

据介绍,“可信发布”是使用 OpenID Connect (OIDC) 标准在可信第三方服务和 PyPI 之间交换短期身份令牌的术语。此方法可用于自动化环境,在发布时无需使用用户名/密码组合或手动生成的 API 令牌通过 PyPI 进行身份验证。

PyPI 维护者可以将 PyPI 配置为信任给定 OpenID Connect 身份提供者 (IdP) 提供的身份。这允许 PyPI 验证身份并将信任委托给该身份,然后授权该身份从 PyPI 请求短期的、范围严格的 API 令牌。这些 API 令牌永远不需要存储或共享,通过快速过期自动轮换,并在已发布的包及其来源之间提供可验证的链接。

PyPI 介绍了通过 GitHub Actions 使用可信发布机制的方式:

jobs:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
+ permissions:
+ # IMPORTANT: this permission is mandatory for trusted publishing
+ id-token: write
steps:
# retrieve your distributions here

– name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
– with:
– username: __token__
– password: ${{ secrets.PYPI_TOKEN }}

详细使用方法查看文档:https://docs.pypi.org/trusted-publishers/ 

Read More 

正文完
可以使用微信扫码关注公众号(ID:xzluomor)
post-qrcode
 0
评论(没有评论)

文心AIGC

2023 年 4 月
 12
3456789
10111213141516
17181920212223
24252627282930
文心AIGC
文心AIGC
人工智能ChatGPT,AIGC指利用人工智能技术来生成内容,其中包括文字、语音、代码、图像、视频、机器人动作等等。被认为是继PGC、UGC之后的新型内容创作方式。AIGC作为元宇宙的新方向,近几年迭代速度呈现指数级爆发,谷歌、Meta、百度等平台型巨头持续布局
文章搜索
热门文章
潞晨尤洋:日常办公没必要上私有模型,这三类企业才需要 | MEET2026

潞晨尤洋:日常办公没必要上私有模型,这三类企业才需要 | MEET2026

潞晨尤洋:日常办公没必要上私有模型,这三类企业才需要 | MEET2026 Jay 2025-12-22 09...
反超Nano Banana!OpenAI旗舰图像生成模型上线

反超Nano Banana!OpenAI旗舰图像生成模型上线

反超Nano Banana!OpenAI旗舰图像生成模型上线 Jay 2025-12-17 10:25:43 ...
“昆山杯”第二十七届清华大学创业大赛决赛举行

“昆山杯”第二十七届清华大学创业大赛决赛举行

“昆山杯”第二十七届清华大学创业大赛决赛举行 一水 2025-12-22 17:04:24 来源:量子位 本届...
企业级智能体落地,谁没踩这四种大坑?无问芯穹的系统性解法来了

企业级智能体落地,谁没踩这四种大坑?无问芯穹的系统性解法来了

企业级智能体落地,谁没踩这四种大坑?无问芯穹的系统性解法来了 衡宇 2025-12-16 20:10:53 来...
最新评论
ufabet ufabet มีเกมให้เลือกเล่นมากมาย: เกมเดิมพันหลากหลาย ครบทุกค่ายดัง
tornado crypto mixer tornado crypto mixer Discover the power of privacy with TornadoCash! Learn how this decentralized mixer ensures your transactions remain confidential.
ดูบอลสด ดูบอลสด Very well presented. Every quote was awesome and thanks for sharing the content. Keep sharing and keep motivating others.
ดูบอลสด ดูบอลสด Pretty! This has been a really wonderful post. Many thanks for providing these details.
ดูบอลสด ดูบอลสด Pretty! This has been a really wonderful post. Many thanks for providing these details.
ดูบอลสด ดูบอลสด Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.
Obrazy Sztuka Nowoczesna Obrazy Sztuka Nowoczesna Thank you for this wonderful contribution to the topic. Your ability to explain complex ideas simply is admirable.
ufabet ufabet Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.
ufabet ufabet You’re so awesome! I don’t believe I have read a single thing like that before. So great to find someone with some original thoughts on this topic. Really.. thank you for starting this up. This website is something that is needed on the internet, someone with a little originality!
ufabet ufabet Very well presented. Every quote was awesome and thanks for sharing the content. Keep sharing and keep motivating others.
热评文章
小米语音首席科学家:AI发展的本质就像生物进化,不开源要慢1000倍 | MEET2026

小米语音首席科学家:AI发展的本质就像生物进化,不开源要慢1000倍 | MEET2026

小米语音首席科学家:AI发展的本质就像生物进化,不开源要慢1000倍 | MEET2026 克雷西 2025-...
顶尖技术+标准产品+创新模式+可靠服务,打造大模型商业落地中国范式

顶尖技术+标准产品+创新模式+可靠服务,打造大模型商业落地中国范式

顶尖技术+标准产品+创新模式+可靠服务,打造大模型商业落地中国范式 思邈 2025-12-16 10:24:0...
PPIO姚欣:AI正在进入自主行动与创造时代,智能体需要全新的操作系统|MEET2026

PPIO姚欣:AI正在进入自主行动与创造时代,智能体需要全新的操作系统|MEET2026

PPIO姚欣:AI正在进入自主行动与创造时代,智能体需要全新的操作系统|MEET2026 梦瑶 2025-12...
Dexmal原力灵机提出ManiAgent,用多智能体协作重构机器人操控

Dexmal原力灵机提出ManiAgent,用多智能体协作重构机器人操控

Dexmal原力灵机提出ManiAgent,用多智能体协作重构机器人操控 量子位的朋友们 2025-12-16...
推特吵架吵出篇论文!谢赛宁团队新作iREPA只要3行代码

推特吵架吵出篇论文!谢赛宁团队新作iREPA只要3行代码

推特吵架吵出篇论文!谢赛宁团队新作iREPA只要3行代码 henry 2025-12-16 15:03:31 ...