

Git config user.email config user.name "some_name"įirstly, generate your own ssh within your email ssh-keygen -t -C then it will ask you where to locate this generated key: Enter file in which to save the key (/home/some-user/.ssh/id_rsa): In your project, remember to set config up // You will need setting for this email in ssh later I will provide a solution used for Mac, Linux and Window using bash.īe awared before start, would be your email to be added in github developer setting later, is used for testing in cased abort pushing to remotely. You are looking for configuring multiple account git using on your local machine. Make sure ~/.ssh/config points to the correct private keyĬonfig multiple accounts on Mac, Linux and bash in Window.Set the permissions on your private key: chmod 400 ~/.ssh/id_rsa.If you get a warning about permissions being too open Permissions 0644 then try these:

Give these credentials a name to remind you which machine it is from. Copy all of it, exactly as it appears, with no extra spaces or lines. Ssh-keygen -t rsa -C your passphrase somewhere safe to use when you push, or you will need to do this again.Ĭopy the contents of id_rsa.pub and paste it into GitHub website under the Account Settings > SSH and GPG Keys. To keep things simple, use 'id_rsa' for the file in which to save the key and make a passphrase to save for later If the email in id_rsa.pub does not match the email you want to use, then make new credentials. There should be these two files: id_rsa and id_rsa.pub. In your shell, add your user name: git config -global user.name "your_username"Īdd your email address: git config -global user.email check the configuration, run: git config -global -list
