git 访问自建gitlab报错:Please make sure you have the correct access rights and the repository exists.
1.首先设置git身份的名字和邮箱: git config --global user.name "yourname" git config --global user.email“your@email.com"2.删除.ssh文件夹(直接搜索该文件夹)下的known_hosts(手动删除即可,不需要git)3.git 输入命令 $ ssh-keyg
文章共240字 · 阅读需要大约1分钟
一键AI生成摘要,助你高效阅读
问答
·
1.首先设置git身份的名字和邮箱:
git config --global user.name "yourname"
git config --global user.email“your@email.com"
2.删除.ssh文件夹(直接搜索该文件夹)下的known_hosts(手动删除即可,不需要git)
3.git 输入命令
$ ssh-keygen -t rsa -C "your@email.com"(填你设置的邮箱地址)
出现:
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/your_user_directory/.ssh/id_rsa):
直接回车
系统会自动在.ssh文件夹下生成两个文件,id_rsa和id_rsa.pub,用记事本打开id_rsa.pub
复制全部内容
4.打开gitlab,登陆你的账户,进入设置
5.git中输入命令:
ssh -T yourname@192.168.2.8
输入命令:yes
更多推荐
已为社区贡献1条内容
所有评论(0)