xgqfrms / git

git all in one
https://git.xgqfrms.xyz
MIT License
2 stars 1 forks source link

git & SSH keys #9

Open xgqfrms opened 4 years ago

xgqfrms commented 4 years ago

git & SSH keys

step 1

generator SSH key pair

https://git.gitlab.com/help/ssh/README#generating-a-new-ssh-key-pair

$ ssh-keygen -o -t rsa -b 4096 -C "xgqfrms@email.com"

image

step 2

add pub key

https://git.gitlab.com/profile/keys

image

xgqfrms commented 4 years ago

Gitlab

$ ssh-keygen -o -t rsa -b 4096 -C "xgqfrms@xgqfrms.xyz"
$ git clone ssh://git@git.xgqfrms.xyz:10022/pnc/mini-program-all.git

image

git config

$ git config user.name "xgqfrms"
$ git config user.email "xgqfrms@xgqfrms.xyz"

# view local config
$ git config -l

# eidt local config
$ code .git/config
xgqfrms commented 4 years ago

https://www.cnblogs.com/xgqfrms/p/12577961.html

xgqfrms commented 4 years ago

image

xgqfrms commented 4 years ago

$ ssh -T git@gitlab.com

$ ssh -T git@xgqfrms.xyz
xgqfrms commented 4 years ago

/Users/xgqfrms-mbp/.ssh/gitlab/id_rsa.pub

https://img2020.cnblogs.com/blog/740516/202003/740516-20200331231932437-2146629834.png

https://img2020.cnblogs.com/blog/740516/202003/740516-20200331232047664-185636778.png

xgqfrms commented 4 years ago

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/gitlab/id_rsa
xgqfrms commented 4 years ago

image

image

git submodule

image

xgqfrms commented 4 years ago

git submodule

# step 04: init submodule
$ git submodule init

# step 05: clone submodule
$ git submodule update
xgqfrms commented 4 years ago

install

$ cd mweb && npm i

$ npm i
$ cd mweb && yarn

$ yarn

taro

# dev
$ npm run dev:h5
$ npm run dev:alipay
$ npm run dev:weapp

# dev
$ yarn run dev:h5
$ yarn run dev:alipay
$ yarn run dev:weapp

# prod
$ yarn run build:h5
$ yarn run build:alipay
$ yarn run build:weapp