Github 取得 Token

目前在 IDE 或是 git 的指令視窗中需要輸入密碼的地方都要改輸入 Token
不然就會出現類似下列的錯誤:
  
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 'https://github.com/ruyut.git/'


取得 Token:

到 Github 右上角,點選大頭貼 > Sittings

捲動到網頁最下面,點選 Developer settings

點選 Personal access tokens > Generate new token

輸入 Token 暱稱,勾選 repo 和 write:packages ,滾動到最下面,點選 Generate token
Token 預設是 30 天會過期,可以依照每個人的習慣選擇

將 Token 複製起來,下次遇到要輸入 GitHub 密碼的地方就把這串 Token 貼上去

留言