GitHub Token的使用
生活随笔
收集整理的這篇文章主要介紹了
GitHub Token的使用
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
GitHub Token的使用
問題
本地項目git push到遠程倉庫 遇到問題:
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: Authentication failed for xxx
解決方案
獲取Token
settings->Developer settings->Personal access tokens
之后復制生成的token,最好暫時先存到一個文件中,后面要用到。
對于本地之前拉取的項目
通過命令修改關聯的url方式,然后重新push即可。
git remote set-url origin https://YourToken@github.com/YourUserName/YourRepositoryName.git/(或打開本地倉庫.git 下的config文件中的[remote “origin”] 直接進行修改)
ps:
- 獲取關聯的url的命令
對于克隆的新項目
- 輸入密碼時輸入token即可。
總結
以上是生活随笔為你收集整理的GitHub Token的使用的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C++面试知识点汇总
- 下一篇: 干货!策略路由和路由策略的区别和联系