github · Git
報錯原文
remote: Support for password authentication was removed on August 13, 2021.
這是什麼意思
GitHub 在 2021 年停止接受透過 https 的帳號密碼——不是你的密碼錯了,而是這種方式本身不再被接受。它出現在你儲存的憑證是舊密碼,或者你在提示處直接輸入了密碼的時候。想繼續用 https,就在密碼欄裡填 personal access token;否則用 git remote set-url origin 換成 ssh 位址。改遠端位址只是你自己複製裡的一行設定,不動任何提交,隨時可以改回來。
怎麼修
git remote set-url origin git@github.com:user/repo.git- 來自
- github
- Git
- 29
git 的錯誤幾乎都是一種拒絕,意思是「在目前狀態下做那件事會丟掉東西」;fatal: 表示它什麼都沒改就停了,而真正的解決辦法往往在第一行下面的 hint: 行裡。
怎麼讀報錯
- 從第一行往下讀。越往下越是工具內部的事,起因通常寫在最上面。
- 有檔名和行號就從那裡查——不是堆疊最上面那一格,而是最上面那條提到你自己寫的檔案的行。
- 把報錯原文照樣去搜,但先去掉你自己的路徑和變數名,正是那些讓搜尋比對不上。
- 同一種情況在不同版本裡措辭不同。結果不對頭,就把版本號一起加進查詢。
- 貼上修法之前,先確認它會丟掉什麼。這裡面有些是不能收回的。
常見問題
Q. “remote: Support for password authentication was removed on August 13, 2021.” 是什麼意思?
GitHub 在 2021 年停止接受透過 https 的帳號密碼——不是你的密碼錯了,而是這種方式本身不再被接受。它出現在你儲存的憑證是舊密碼,或者你在提示處直接輸入了密碼的時候。想繼續用 https,就在密碼欄裡填 personal access token;否則用 git remote set-url origin 換成 ssh 位址。改遠端位址只是你自己複製裡的一行設定,不動任何提交,隨時可以改回來。
Q. 怎麼修?
git remote set-url origin git@github.com:user/repo.git —— 執行前先看上面的說明,確認這條命令會丟掉什麼。
Q. 這是哪個工具報的?
github。它屬於Git,報錯原文有 11 個詞。
相關報錯
fatal: Authentication failed for 'https://github.com/user/repo.git/'gitgit@github.com: Permission denied (publickey).sshfatal: Unable to create '/repo/.git/index.lock': File exists.gitnothing to commit, working tree cleangiterror: unable to unlink old 'dist/main.js': Permission deniedgitfatal: bad object 8a3f21cgitwarning: LF will be replaced by CRLF in package.json.gitThe file will have its original line endings in your working directorygit