1
votes

I have one issue with github , before month i have setup git account (user1) on github and worked with git from my system. now i have created second account (user2) and add new rsa_id key in ~/.ssh folder (take backup of old keys in another folder).

Now when i follow the steps shown on github

Global setup:

Set up git git config --global user.name "user2"
git config --global user.email [email protected]

Next steps:

mkdir Web
cd Web
git init
touch README

git add README
git commit -m 'first commit'
git remote add origin [email protected]:user2/Web.git
git push -u origin master

when i committed it would display previous account username (user1). what should be issue here and how can i resolve this?

thanks.

1

1 Answers

0
votes

Try doing:

ssh -T [email protected]

It should print out the user2 username that you want. If not, make sure you have added the keys properly to the account and the proper keys are being presented. Use -v flag in the above command to see what's happening.

Note that Github uses the configured email to associate commits with the user. So verify that it is really set ( git config -l etc. and verify)