git下载、安装、链接github

0.下载gitlinux

官网下载速度慢,下载不下来
阿里云下载地址:https://npm.taobao.org/mirrors/git-for-windows/git


1.安装gitgithub

linux:
在命令行直接输入:git,查看结果,有没有安装。
若是没有安装,sudo apt install gitnpm


2.设置姓名和邮箱及命令行输出颜色`windows

git config --global user.name "Mike"
git config --global user.email "z_runwei@163.com"
git config --global color.ui autossh


3.建立 SSH Key测试

ssh-keygen -t rsa -C "your_email@example.com"
* 显示:
Generating public/private rsa key pair.
Enter file in which to save the key
(/Users/your_user_directory/.ssh/id_rsa): 按回车键
Enter passphrase (empty for no passphrase): 输入密码3307086;通常不输入密码,直接回车
Enter same passphrase again: 再次输入密码网站


4.在github网站上注册帐号并登录ui


5.在GitHub中添加公开密钥,从此就能够用私有密钥进行认证了。阿里云


6.测试:

用手中的私人密钥与GitHub进行认证和通讯
ssh -T git@github.com


7.在github创建仓库


8.在命令行clone仓库

git clone git@github.com:zrunwei/HelloWorld.git(ssh传输协议)
git clone https://github.com/zrunwei/HelloWorld [myHelloWorld](http传输协议)

git clone 后面的内容到github上复制想克隆到哪里就在哪一个文件夹里右击,点击Git Bash Here,再执行以上命令

相关文章
相关标签/搜索