Git: How do I set up SSH keys to access my remote repository from a second computer?

谁都会走 提交于 2019-12-22 10:34:00

问题


I have a git repository on Unfuddle, and a Windows machine I'm using with msysgit. I set up an SSH key on that machine using ssh-keygen, which gave me some key files. I copied the contents of the public key file into my personal settings in my Unfuddle account, and that works fine.

So what do I need to do to get it working on a second machine? If I follow the same process, I'll have to put the new public key into my Unfuddle account, so presumably the old machine will stop working. Is there some way I can get my second machine to use the same key as the first machine?

Thanks, Grant


回答1:


1/ If this the same user, you could copy your ~/.ssh/id_rsa and id_rsa.pub to your other machine home directory.

or:

2/ You should be able to register another public key to your unfuddle account, allowing you to manage one private key per machine.




回答2:


Just use the same private key to connect from the second machine, if they're both under your control.



来源:https://stackoverflow.com/questions/3164745/git-how-do-i-set-up-ssh-keys-to-access-my-remote-repository-from-a-second-compu

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!