Switch the SSH key of multiple github accounts to ssh-keygen-t rsa-C 'second @ mail.com '. By default, SSH only reads id_rsa, so in order for SSH to identify the new private key, you need to add it to SSH agentssh-add ~ /. Ssh/id_rsa_second if the command returns the following error: cocould not open a connection to your authentication agent. Unable to connect to the ssh agent, run the ssh-agent bash command and then run the ssh-add command. After completing the above steps, go ~ /. Create a config file in the ssh Directory, which is used to configure the server corresponding to the private key. The content is as follows: # Default github user (first@mail.com) Host github.com HostName github.com User git IdentityFile C:/Users/username /. ssh/id_rsa # second user (second@mail.com) Host github-second HostName github.com User git IdentityFile C:/Users/username /. ssh/id_rsa_secondHost can be used at will to facilitate your memory and will be used later when remote access is added. After the configuration is complete, when connecting to the github repository of a non-default account, make some changes to the address of the remote library. For example, add a repository test under the second Account, add: git remote add test git @ github-second: second/test. git # not the original git@github.com: second/test. git uses id_rsa_second to connect to the server each time it connects. This is a success! Note: 1: github according to the configuration file user. email to get github account display author information, so for multi-account users must remember to change user. email to the corresponding email (second@mail.com ). 2: it is better to write an absolute path to the above path, so it is not easy to make an error (at first I made an error mainly because of the path problem ..........)