Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7083177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:08:45+00:00 2026-05-28T07:08:45+00:00

I had one existing account with Github and the source are getting pushed to

  • 0

I had one existing account with Github and the source are getting pushed to old account, but i need to switch that to another new one (some private issue and public issue).

$ git config --global user.name mynewprivate
$ git config --global user.email mynewprivate@myemail.com
$ git remote add origin git@github.com:mynewprivate/mynewprivaterepo.git
fatal: remote origin already exists.

How to resolve it?

Follow up:

Admin | switch from public repo to | his own private repo | push himself

1) I created the key files, private and public.

$ ssh-keygen -t rsa -C "themail@ofyours.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/sun/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/sun/.ssh/id_rsa.
Your public key has been saved in /home/sun/.ssh/id_rsa.pub.
The key fingerprint is:
c3:1a:88:49:0e:0b:d0:2 themail@ofyours.com
The key's randomart image is:
+--[ RSA 2048]----+
|o+o              |
|E..+             |
|=++ .            |
|+Xoo . .         |
|=.* . . S        |
| o     o .       |
|      .          |
|                 |
|                 |
+-----------------+

2) I copied it for backup if i lose it i can use it

$ cp -R /home/sun/.ssh/id_rsa to /var/tmp/myprojectname.backup.key

3) I went to github and created the public key from there site (SSH Public key)

4) Then i tested if my system can communicate with git

$ ssh -T git@github.com
Hi {hubname}! You've successfully authenticated, but GitHub does not provide shell access.

    It works!

5) Project upload

$ cd /var/www/html/myprject
$ git remote rm origin
$ git remote add origin git@github.com:myproject/myproject.git

6) I followed as usual my IDE, now to load myproject.git and the private
key that i saved in my /var/tmp/myprojectname.backup.key
7) It started pushing, means uploading success...

Third party developers | get access to push | Admin private repo

1) Admin adds your username in to there private repo
2) In your personal username you get notice that you are allowed
3) You accept and find the repository details in your own account
4) You do following:

$ ssh-keygen -t rsa -C "youremail@mail.com"
  save the file to /var/tmp/yourproject.name.key
$ cd /var/www/html/localproject
$ git init
$ git remote add origin git@github.com:private/private.git

5) Now you can push to the private repo
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:08:46+00:00Added an answer on May 28, 2026 at 7:08 am

    Looks like you already have a remote named origin. Delete it, then recreate it.

    git remote rm origin
    git remote add origin git@github.com:mynewprivate/mynewprivaterepo.git
    

    If you want to see why it’s failing though, check out .git/config and you’ll see the old remote in there. An alternative way to do the same as the above two commands do would be to edit that file.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had read somewhere about one specific feature that is present in awk but
We're consolidating two old cvs servers onto one new box. I had hoped the
I had an existing WCF web service that contains three WebGet handlers in one
I had created a new stored procedure from an existing one. all I did
I had only one function to Add another row to the table id=tblOtherParties and
At one point I had a nice little compression utility that smashed my Delphi
For one reason or another I had to empty folder in my subversion repository
I had a question answered which raised another one, why following does not work?
In a previous job we had an extensive SQLServer database that constantly had new
We have some existing software (C++ Windows applications) that have had their resources translated

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.