常用的生成令牌方式不多介绍,参考1
得到令牌后替换url
格式为
https://你的令牌@github.com/<USERNAME>/<REPO>.git
查看仓库url
git remote -v
假如为
https://github.com/jiang/megatron.git
令牌为CCCC
则将“令牌”@插入github之前
使用
git remote set-url origin https://CCCC@github.com/jiang/megatron.git
# git clone报错解决:remote: Support for password authentication was removed on August 13, 2021 ↩︎