简体   繁体   English

Mac上的Git入门

[英]Getting started with Git on Mac

I am new to Git (and to my Mac). 我是Git(和Mac)的新手。 I installed it on my Mac, but don't have a clue where to go from here. 我已将其安装在Mac上,但不知道从何处去。 My professor emailed me a public/private ssh key pair - where/how do I insert these keys so that I can clone his code? 我的教授通过电子邮件向我发送了公共/私人ssh密钥对-我在哪里/如何插入这些密钥,以便克隆他的代码?

You don't need public/private key of your professor to be able to clone his repository. 您不需要教授的公共/私有密钥即可克隆他的存储库。

What you need to do is to generate your own keypair with ssh-keygen and send the public key ( ~/.ssh/id_rsa.pub file) to your professor. 您需要做的是使用ssh-keygen生成自己的密钥对,并将公共密钥( ~/.ssh/id_rsa.pub文件)发送给您的教授。 He should set up the repository to allow authentication with this key. 他应该设置存储库以允许使用此密钥进行身份验证。

On the side note: private key, as the name suggest, is private. 旁注:顾名思义,私钥是私有的。 You don't want to share it with anyone. 您不想与任何人分享。 You also don't want to use a private/public key pair you got from someone. 您也不想使用从某人那里获得的私钥/公钥对。

我将从阅读Pro Git书籍开始,该书可在progit.org上免费在线获得

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM