GitHub Error: Key already in use

后端 未结 7 1946
逝去的感伤
逝去的感伤 2021-01-30 02:54

I have created two GitHub accounts. One for my work user and one for my personal self. I needed to do catch up on some work and as such cloned my work repo onto my personal PC

7条回答
  •  执笔经年
    2021-01-30 03:52

    You probably just need to change the name of your key.

    ssh-keygen -t rsa -b 4096 -C ""
    

    Then it will ask to enter the file name, make sure that you enter the path name which does not exist on your system. Usually, "id_rsa" file name is created by default on MAC. Just change the name and then use following command to copy

    pbcopy < {Path where SSH-Keygen is stored}
    

    That's it. You can simply paste this keygen (copied from above command on the clipboard) in GitHub and use that without any problem.

提交回复
热议问题