我想使用一个github帐号,在A机器上编辑代码后提交,在B机器上更新运行。或者B上编辑,A上更新。 我是不是要把私钥分别在A,B机器上注册?github端不变动? 求指导。。
业精于勤,荒于嬉;行成于思,毁于随。
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
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.
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
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.