Git:我如何设置SSH密钥以从第二台计算机访问我的远程存储库? [英] Git: How do I set up SSH keys to access my remote repository from a second computer?

查看:128
本文介绍了Git:我如何设置SSH密钥以从第二台计算机访问我的远程存储库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Unfuddle 上有一个git存储库,以及一台使用msysgit的Windows机器。我使用ssh-keygen在该机器上设置了一个SSH密钥,该密钥给了我一些关键文件。我将公钥文件的内容复制到了我的Unfuddle帐户中的个人设置中,并且工作正常。

那么,我需要做些什么才能使它工作第二台机器?如果我遵循相同的流程,我将不得不将新的公钥放入我的Unfuddle帐户中,因此推测旧机器将停止工作。有什么方法可以让我的第二台机器使用与第一台机器相同的钥匙?



谢谢,
格兰特


1 /如果这是同一个用户,你可以复制你的〜/ .ssh / id_rsa 和 code> id_rsa.pub 到您的其他机器主目录。



或:

2 /您应该可以将其他公开密钥注册到您的开账户,每台机器管理一个私钥。


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/ 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.

这篇关于Git:我如何设置SSH密钥以从第二台计算机访问我的远程存储库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆