Github使用全攻略:快速安装、认证方案与仓库操作指南
Github使用全攻略:快速安装、认证方案与仓库操作指南
快速安装
1 | 1.申请API Token: |
########################################################
SSH-Key认证方案 注:一个pubkey不能在多个项目中使用会报错
- ssh-keygen.exe
- cat ~/.ssh/id_rsa.pub
- Add a new public key: https://github.com/settings/ssh/new
创建仓库 001
下载仓库 001
$ git clone [email protected]:test/ATM.git
$ git config --global user.email "[email protected]"
$ git config --global user.name "Your Name"
提交修改 001
1. Open Git-Bash
2. cd ~/Desktop/github/Atom
3. git add --all; git commit -m 'test it'; git push
########################################################
Token认证方案
1.申请API Token: https://github.com/settings/tokens
Token_xxx
创建仓库 002
下载仓库 002
$ git clone https://github.com/test/webapi.git
$ git config --global user.email "[email protected]"
$ git config --global user.name "admin"
提交修改 002
1. Open Git-Bash
2. cd ~/Desktop/github/webapi
3. git add --all && git commit -m a && git push https://admin:[email protected]/test/webapi.git