问题描述:
克隆指令:
git clone git@igit.xxxxcorp.com:ai_group/corp-workspace.git
报错:
$ git clone git@igit.xxxxcorp.com:ai_group/corp-workspace.git
Cloning into 'corp-workspace'...
git@igit.xxxxcorp.com's password:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
首先,设置用户名和邮箱
git config --global user.name "你的名字"
git config --global user.email "你的公司邮箱"
#查看
git config --list
其次,生成公钥,匹配公钥
#通过命令 ssh-keygen 生成 SSH Key:
ssh-keygen -t ed25519 -C "Gitee SSH Key"
查询密钥文件
ls ~/.ssh/
读取公钥文件:
cat ~/.ssh/id_ed25519.pub
#例 ssh-ed25519 AAAA***5B Gitee SSH Key

将公钥写入 igit 的秘钥中,保存。
