- ssh-keygen -t rsa -C "youremail@example.com"
:创建SSH Key - 在用户主目录里找到.ssh目录,里面有id_rsa和id_rsa.pub两个文件,这两个就是SSH Key的秘钥对,id_rsa是私钥,不能泄露出去,id_rsa.pub是公钥,可以放心地告诉任何人
- 登陆GitHub,打开“Account settings”,“SSH Keys”页面,然后,点“Add SSH Key”,填上任意Title,在Key文本框里粘贴id_rsa.pub文件的内容
- 添加远程库git remote add origin git@github.com:michaelliao/learngit.git
- 第一次:git push -u origin master
以后:git push origin master - 从github克隆:git clone git@github.com:你的名字/gitskills.git
- 注意:github上的东西任何人都可以看,除非缴费变成私有
Git使用常用命令总结2---创建githu…
最新推荐文章于 2023-05-20 15:36:54 发布