エラー内容
SourceTreeを使ってGithubにpush使用とすると、下記のようなエラーメッセージが出ました:
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
Personal access tokenを使って認証していないのが原因のようです。
解決法
- SourceTreeのウィンドウ左上、歯車の形の「設定」をクリック
- リモートリポジトリパスのを選んで編集
- パスを次のように設定する
Personal token が 123456 だとして、GithubのURLが https://github.com/hogehoge/hoge だとすると、
https://123456@github.com/hogehoge/hoge.git
Personal tokenの取得については、https://codesapuri.com/articles/31 などを参照してください。
なぜこれを書いたか
まだ記事を投稿したことがなかったのでチャレンジしてみました。
参考にしたURL
https://codesapuri.com/articles/31
https://oc-technote.com/github/sourcetree-cannot-access-github-using-accesstoken/