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

  • SEARCH
  • Home
  • 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 6557217
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:02:45+00:00 2026-05-25T13:02:45+00:00

I have several identities to work with github. They are managed via the .ssh/config

  • 0

I have several identities to work with github. They are managed via the .ssh/config file:

# This is the normal github account. We do not need this (it is the default),
#   but putting it here makes things more clear
Host github.com
     User           git
     HostName       github.com 
     IdentityFile   <rsa1>

# We use this fake host so that we can provide an alternative ssh keypair
Host github-2.com
     User           git
     HostName       github.com 
     IdentityFile   <rsa2>

I have verified that I am authorized with both accounts:

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

ssh -T git@github-2.com
Hi user2! You've successfully authenticated, but GitHub does not provide shell access.

Now I go to my repo, and try to push to the remote a new branch

git push origin origin:refs/heads/testing
error: src refspec origin does not match any.
error: failed to push some refs to 'git@github-2:user2/repo.git'

The relevant section in my .git/config is:

[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = git@github-2.com:user2/repo.git

And I have this:

$ git remote -v
origin  git@github-2.com:user2/repo.git (fetch)
origin  git@github-2.com:user2/repo.git (push)

What could be going wrong?

  • 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-25T13:02:46+00:00Added an answer on May 25, 2026 at 1:02 pm

    I will put this here for reference, since I solved my issue: I know how, but I do not really know why.

    I did a new clone of my repo. The .git/config was the same as my original one.
    In this fresh copy, I have no push issues. Magic.

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

Sidebar

Related Questions

We have several jobs that run concurrently that have to use the same config
I have several keyboards and they type in different TMemos. In english, everything works
I have several forms each having a hidden field that identifies this form...I want
I have a CSV file which contains an ID and several other columns. I
I have tried several things to get it work. Here is my problem. I
I have had several contexts where table names or schemas were not hard-coded, but
I have several windows machines identified by ip address. I would like to write
I have several ASP:TextBox controls on a form (about 20). When the form loads,
I have several RequiredFieldValidators in an ASP.NET 1.1 web application that are firing on
I have several tables whose only unique data is a uniqueidentifier (a Guid) column.

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.