GitHub fatal remote origin already exists

0 votes

I issued an SSH key on GitHub and made a new repository. But an error occurs when  I enter the next line into the terminal.

Parkers-MacBook-Pro:.ssh ppreyer$ git remote add origin git@github.com:ppreyer/first_app.git
fatal: remote origin already exists.

How can I solve this?

Apr 29 in Git & GitHub by Kichu
• 19,040 points
497 views

1 answer to this question.

0 votes

Update the existing remote:

$ git remote set-url origin git@github.com:ppreyer/first_app.git

You can add the new remote with a different name or update the existing one if you don't need it. To add a new remote do the following:

$ git remote add github git@github.com:ppreyer/first_app.git

I hope this helps you.


answered May 1 by narikkadan
• 37,660 points

Related Questions In Git & GitHub

–1 vote
1 answer

Having problem in Github and remote Git repo with production and development code

I think you could start with this. The ...READ MORE

answered Apr 10, 2018 in Git & GitHub by shubham
• 7,320 points
458 views
0 votes
1 answer

gerrit-cherry-pick:fatal: 'origin' does not appear to be a git repository

The user account making that command does ...READ MORE

answered Aug 13, 2018 in Git & GitHub by Kalgi
• 52,350 points
1,258 views
+2 votes
5 answers

error cloning remote repo 'origin'

ERROR: Error cloning remote repo 'origin' hudson.plugins.git.GitException: Could ...READ MORE

answered Jun 3, 2019 in Git & GitHub by Sirajul
• 59,190 points
31,144 views
0 votes
0 answers
+1 vote
2 answers

fatal: unable to access could not resolve host: GitHub

Hi@akhtar, This can be caused in incorrect proxy ...READ MORE

answered Apr 10, 2020 in Git & GitHub by MD
• 95,380 points
98,691 views
+15 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
2,081 views
+2 votes
1 answer
0 votes
1 answer

git error: failed to push some refs to remote

I would advise using: git pull --rebase git push The ...READ MORE

answered May 2 in Git & GitHub by narikkadan
• 37,660 points
3,789 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP