【发布时间】:2021-03-09 06:44:41
【问题描述】:
我尝试让 Gitlab 与 SSH 一起工作,但它不会。
我已经完成了以下步骤:
1) 生成 ssh-key
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
标签: ssh timeout repository gitlab