我想使用一個github帳號,在A機器上編輯代碼后提交,在B機器上更新運行?;蛘連上編輯,A上更新。
我是不是要把私鑰分別在A,B機器上注冊?github端不變動?
求指導。。
業(yè)精于勤,荒于嬉;行成于思,毀于隨。
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.