一、下载安装git并配置github仓库
1.下载安装git(略)
安装地址如下:https://git-scm.com/downloads,自取,一路next即可。
2.配置生成SSH Key
ssh-keygen -t rsa -C "XXXX@XXXx.com"
后面的 XXXX@XXXx.com改为你在 Github 上注册的邮箱,
之后会要求确认路径和输入密码,我们这使用默认的一路回车就行。成功的话会在 ~/ 下生成 .ssh 文件夹,进去,打开 id_rsa.pub,复制里面的 key。
3.github秘钥绑定
个人-->settings-->ssh and gpg keys-->new add
4.查看是否成功
ssh -T git@github.com
二、项目上传
1.在github上new repository
2.跟据步骤上传项目
echo "# q-a" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/****/***.git
git push -u origin master
3.报错
error: RPC failed; curl 56 OpenSSL SSL_read: Connection was reset, errno 10054
解决方案:
git config --global http.sslVerify "false"