$ cd ~/.ssh$ ssh-keygen -t rsa -C "youxiang name@xx.com"-t 為指定加密方式為RSA, -C 為指定郵箱。命令完成后目錄下會生成id_rsa(私鑰)和id_rsa.pub(公鑰)使用命令打印公鑰:$ cat id_rsa.pub將打印出來的內(nèi)容復(fù)制,并粘貼到GitLab的“個人資料設(shè)置-ssh秘鑰”中,否則會報錯,如:
ssh: connect to host github.com port 22: Connection refused fatal:
Could not read from remote repository. Please make sure you have
the correct access rights and the repository exists。
$ vi config/*輸入內(nèi)容Host gitlab.xx.com HostName gitlab.xx.com Port 22(修改成你服務(wù)器的端口號) */保存后在使用命令測試連通重啟ssh服務(wù)/usr/sbin/sshd restart 工作模式
GitFlow方式詳細說明。
http://nvie.com/posts/a-successful-git-branching-model/新聞熱點
疑難解答