我尝试使用SSH让Gitlab工作,但不成功。
我已经完成了以下步骤:
1) 生成SSH密钥。
我已经完成了以下步骤:
1) 生成SSH密钥。
ssh-keygen -t rsa -C "myemail@myhoster.com" -b 4096
2) 在文件夹 /Users/myUserName/.ssh/ 中将密钥命名为 "id_rsa"
3) 通过复制密钥
pbcopy < ~/.ssh/id_rsa.pub
4) 将密钥插入GitLab
现在当我尝试克隆存储库时,我收到以下错误:
$ git clone git@gitlab.com:myName/repositoryName/ repoName
Cloning into 'repoName'...
ssh: connect to host gitlab.com port 22: Operation timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
出了什么问题?
git clone myUsername@gitlab.com:myName/repositoryName/ repoName
。 - Joao Vitorino