I've recently cloned a repo to my local drive, but now I'm trying to push all changes to a complete new repo. However, git keeps telling me that permission is denied, and that's because it's trying to push to the originally-cloned repo.
DETAILS:
I originally cloned from https://github.com/taylonr/intro-to-protractor (i.e. based on a Pluralsight course at https://app.pluralsight.com/library/courses/protractor-introduction/table-of-contents ) .
Now that I've completed the course, I'd like to push my finalized code up to my own git repo (which I just created on github):
https://github.com/robertmazzo/intro-to-protractor
When I use the following git command:
git remote add origin https://github.com/robertmazzo/intro-to-protractor.git
it tells me remote origin already exists
, which I guess is fine because I already created it on github.com.
However, when I push my changes up I'm getting an exception.
git push origin master
remote: Permission to taylonr/intro-to-protractor.git denied to robertmazzo.
fatal: unable to access 'https://github.com/taylonr/intro-to-protractor.git/':
The requested URL returned error: 403
So I'm investigating how I can switch to my new repository, but this is exactly where my issue is. I cannot figure this part out.