更多内容可移驾至我的独立Blog: http://www.justfbt.com/
add localhost ssh key to github
略 …
configure git
# git config --global user.name "loginusername"
# git config --global user.email "mailaddress"
test connection
# ssh git@github.com
Hi xxx! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.
clone repo
# git clone https://github.com/username/xxx.git
change authentication method to ssh
# cd your-repo-dir
# vim .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
# url = https://github.com/yourusername/xxx.git
url = git@github.com:yourusername/xxx.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
test:
change something and git push
push:
# git commit -am 'update'
# git push
done.