複数のgitアカウントを持ってたら生じるエラーの解決方法
git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/使用したいアカウントの名前/プロジェクトの名前.git
まで順調だったのだが、
git push -u origin master
すると、
remote: Permission to 使用したいアカウントの名前/プロジェクトの名前.git denied to 前に使用していたアカウントの名前. fatal: unable to access 'https://github.com/使用したいアカウントの名前/プロジェクトの名前.git/': The requested URL returned error: 403
となり、gitにあげられなかった、
-
-
-
- 解決策-----
-
-
どうやらとりあえずは
git remote set-url origin https://使用したいアカウントの名前@github.com/使用したいアカウントの名前/プロジェクトの名前.git
を入力し、
git push origin master
することで解決した