Github SSH 设置


open git bash to gen key

ssh-keygen -T rsa -C "yujialive@gmail.com"
passphrase # 可以为空格

<homedir>/.ssh/id_rsa
<homedir>/.ssh/id_rsa.pub

copy pub key to github site

id_rsa.pub to github.com -- user settings -- ssh keys

test ssh and gen hosts

ssh -T git@github.com

config repo

# change to ssh link for old repo
git remote -v
git remote set-url origin git@github.com:yujialive/yujialive.github.io.git

# new git repo
git remote add origin git@github.com:yujialive/yujialive.github.io.git

git config --global user.name "yujialive"
git config --global user.email "yujialive@gmail.com"

# or
git config --local user.name "yujialive"
git config --local user.email "yujialive@gmail.com"
panda /
Published under (CC) BY-NC-SA in categories github  tagged with ssh