-
Generating a new SSH key pair 生成ssh key
http://gitlab.test/help/ssh/README#locating-an-existing-ssh-key-pair
ssh-keygen -o -t rsa -C "[email protected]" -b 4096
-
Add SSH Keys (public key) in User Settings. 在用户设置中配置ssh keys 公钥
-
IF can’t ssh login via Domain, config it in the hosts file.如果不能通过域名登录ssh,在hosts文件中配置域名与ip的映射, windows hosts file located in
C:\Windows\System32\drivers\etc
config will like this:172.27.xx.xxx gitlab.test
-
Then test ssh login in cmd
ssh -T gitlab.test
if succeed, it will echoWelcome to GitLab, @username!
-
Then clone:
git clone [email protected]:relative/repo.git