$ cd ~/.ssh$ ssh-keygen -t rsa -C "youxiang name@xx.com"-t 为指定加密方式为RSA, -C 为指定邮箱。命令完成后目录下会生成id_rsa(私钥)和id_rsa.pub(公钥)使用命令打印公钥:$ cat id_rsa.pub将打印出来的内容复制,并粘贴到GitLab的“个人资料设置-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/*输入内容Host gitlab.xx.com HostName gitlab.xx.com Port 22(修改成你服务器的端口号) */保存后在使用命令测试连通重启ssh服务/usr/sbin/sshd restart 工作模式
GitFlow方式详细说明。
http://nvie.com/posts/a-successful-git-branching-model/新闻热点
疑难解答