发布于 

Github使用全攻略:快速安装、认证方案与仓库操作指南

Github使用全攻略:快速安装、认证方案与仓库操作指南

快速安装

1
2
3
4
5
6
7
8
9
10
11
12
1.申请API Token:
User_xxx Token_yyy

2.下载代码仓库,执行脚本
cd /opt/apps/falcon/
git clone https://www.github.com/test/Spring3.git
cd Spring3 && sh test.sh

3.执行命令,上传数据
cd /opt/apps/falcon/Spring3/
ifconfig > if.txt
git add --all && git commit -m a && git push https://user:[email protected]/test/Spring3.git --all

########################################################

SSH-Key认证方案 注:一个pubkey不能在多个项目中使用会报错

  1. ssh-keygen.exe
  2. cat ~/.ssh/id_rsa.pub
  3. 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