yum install git
cd ~/.ssh
,在這個目錄下輸入ssh-keygen
,一直回車就能夠了,這個時候就會出現id_rsd.pub公鑰和id_rsa私鑰,而後cat id_rsa.pub
,把這個公鑰複製到對應的碼雲平臺或者是github上,配置SSH Keygit config | git init |
---|---|
git clone | git remote |
git fetch | git commit |
git rebase | git push |
git clone github上對應ssh鏈接
,把代碼克隆到本地了學習網址http://www.runoob.com/git/git-tutorial.html
html
git clone git@github.com:git/git.git
,前提是你在github上配置了公鑰cp contrib/completion/git-completion.bash /etc/bash_completion.d/
source /etc/bash_completion.d/git-completion.bash
vim ~/.bash_profile
,添加下面的就能夠了# Git bash autoload if [ -f /etc/bash_completion.d/git-completion.bash ]; then source /etc/bash_completion.d/git-completion.bash fi