【初心者】GitHubへのプッシュが失敗する
解決したいこと
Githubのレポジトリにプッシュしたくて以下のような手順を踏んだのですが、エラーメッセージが出て失敗します。
OSはUbuntuを使っています。
解決方法を教えていだだけると幸いです。
試したこと
Githubにレポジトリを作り、ローカルのコンソールでレポジトリを作りました。
cd ~/document/nodejs-study
git init
git add .
git commit -m "first commit"
その後、Githubにプッシュしようとして以下のコマンドを入力しました。
git remote add origin git@github.com:(ユーザー名)/nodejs-study.git
git branch -M main
git push -u origin main
Githubのパスワードの入力を求められたため、パーソナルアクセストークンを入力しました。
Password for 'https://(ユーザー名)@github.com':
すると、以下のエラーメッセージが出ます。
remote: Permission to (ユーザー名)/nodejs-study.git denied to (ユーザー名).
fatal: unable to access 'https://github.com/(ユーザー名)/nodejs-study.git/': The requested URL returned error: 403
0 likes