Git error remote origin already exists: trying to make initial commit -


i'm trying push first commit new github repository , running issues remote origin. when try commit , push readme.txt file, fine until instructions indicate need run in command line:

git remote add origin https://github.com/afreymiller/personal_website.git 

i

"fatal: remote origin exists." 

fair enough,

git push -u origin master 

as instructions indicate, , receive error

fatal: 'git@github.com/afreymiller/personal_website.git' not appear git repository fatal: not read remote repository.  please make sure have correct access rights , repository exists. 

what should next?

it looks you're trying change repo url ssh https. have remote origin url, instead of adding new one, change existing 1 using following command:

git remote set-url origin https://github.com/afreymiller/personal_website.git 

after execute command, git install interacting github using https, want. using https instead of ssh, prompt password every time push github, less complicated setting public/private key pair ssh requires.

details on switching remote urls: https://help.github.com/articles/changing-a-remote-s-url/


Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -