第一步需要安装好git工具,移步官网进行下载git官网
创建版本库
- 创建一个空文件夹(我的文件版本库名称就叫gitlib)
- mkdir gitlib
- cd gitlib
- git init (把gitlib这个文件夹变成git可以管理的文件夹)
- 从远程库克隆项目到git版本库 (dxc1995是我的github名称,find_douban_movies_name是项目名称)
- git clone [email protected]:dxc1995/find_douban_movies_name.git ①
①运行后出现以下报错
问题描述:The authenticity of host 'github.com (52.74.223.119)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com,52.74.223.119' (RSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
问题原因:Github与ssh连接需要密钥
解决办法:登录自己的github进入项目的存储库----进入setting----部署秘钥(Deploy keys)