使用个人访问令牌,
配合 https
才是正理
官方文档
https://docs.github.com/cn/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token
对于已经存在的仓库
git push https://username:password@github.com/username/repository.git
等价于
git push https://username:password@github.com/org/repository.git
等价于
git push https://username:your_token@github.com/username/repository.git
例子
git push https://Deng:mr@github.com/PasteLeChien/gl.git
使用个人访问令牌安全地推送Git仓库
本文介绍了如何利用个人访问令牌增强GitHub仓库的安全性。通过创建并使用个人访问令牌,可以替代用户名和密码进行身份验证,尤其适用于已存在的仓库。示例中展示了如何在Git push命令中应用令牌,提高代码托管的安全实践。
419

被折叠的 条评论
为什么被折叠?



