git拉取报错问题

问题描述:

克隆指令:

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 的秘钥中,保存。

相关推荐
咋吃都不胖lyh12 小时前
提交(Commit)到本地的 Git 仓库,然后才能推送(Push)到远程的 Git 仓库
git
__zRainy__14 小时前
VS Code 自动同步如何重写 Git 历史:一次重复合并冲突的排查与恢复
git
IT码农-爱吃辣条15 小时前
AI Codeview 安装与使用教程
git·ai
司南-704915 小时前
怎么使用git打包tag,并推送到远程仓库
git
考虑考虑15 小时前
git中的tag
git·gitlab·github
REDcker16 小时前
Git浅克隆详解与实践
大数据·git
养肥胖虎1 天前
Git提交规范笔记:feat和fix到底该怎么写
git·conventionalcommits
手握风云-1 天前
深入 Git:它是如何记录世界的(二)
git
weixin_433417672 天前
TortoiseGit推送到远端,如何配置
windows·git
Hey_Coder2 天前
【Git 常用命令速查表(按功能分类)】
git·git基础命令·git命令速查表·git 常用命令