github - 使用git同步个人在不同电脑上的代码问题
迷茫
迷茫 2017-04-22 08:59:07
0
4
663

我想使用一个github帐号,在A机器上编辑代码后提交,在B机器上更新运行。或者B上编辑,A上更新。
我是不是要把私钥分别在A,B机器上注册?github端不变动?
求指导。。

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(4)
Peter_Zhu

Generate ssh keys on machines A and B respectively, and then add the public keys of A and B to github.

For detailed process, please check the help provided by github: common SSH Problems

小葫芦

Of course, you can only generate the key pair on A and then copy the private key generated on A to B. The public key only needs to be uploaded once

PHPzhong

It is best to generate two pairs of keys, which is easier to manage.

伊谢尔伦

Sharing a key is neither elegant nor secure.
In fact, you can upload multiple keys. I have encountered this problem before. For specific steps, you can read the first part of my article: Problem-driven Git learning.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template