📜  将令牌添加到 cli git - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:34.600000             🧑  作者: Mango

代码示例1
git remote add origin https://[USERNAME]:[NEW TOKEN]@github.com/[USERNAME]/[REPO].git
//how to generate token : https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token
//or if you have set origin before 
git remote set-url origin https://[USERNAME]:[NEW TOKEN]@github.com/[USERNAME]/[REPO].git