
概要
2021年8月13日から、GitHubではパスワードによる認証が廃止されました。
remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/jos-sugi/mare.git/'
秘密鍵を用いた認証などいくつか方法がある中で、パーソナルトークンで認証する方法をよく使用しています。
毎回思い出して認証を通しているためメモとして残します。
パーソナルトークンの作成





- Note:トークン名(何でもOK)
- expireation:有効期限

repo
repo:status
アクセス コミット ステータス
repo_deployment
デプロイメントステータスへのアクセス
public_repo
パブリック リポジトリにアクセスする
repo:invite Access
リポジトリへの招待
security_events
セキュリティ イベントの読み取りと書き込み


アクセストークンの設定

- .configはホームディレクトリにあります。
command⌘ + shift⇧ + H
でホームディレクトリに移動します - .configは隠しファイルです。
command⌘ + shift⇧ + .
で隠しファイルを表示します

[url "https://[作成したアクセストークン]:x-oauth-basic@github.com/"]
insteadOf = https://github.com/
もしくはターミナルで
git config --global url."https://[作成したアクセストークン]:x-oauth-basic@github.com/".insteadOf "https://github.com/"