当前位置:   article > 正文

git clone报错 "Could not read from remote repository..Please make sure you have the correct access_could not read from remote repository. please make

could not read from remote repository. please make sure you have the correct

1.下载git,使用命令:

yum install git
  • 1

2.配置git:

1 git config --global user.name "Your Name"
2 git config --global user.email "email@example.com"
3 #查看配置是否生效
4 git config --list
  • 1
  • 2
  • 3
  • 4

3.创建本地仓库:

1 #创建目录
2 mkdir gitspace
3 cd gitspace
4 git init
  • 1
  • 2
  • 3
  • 4

4.克隆代码

git clone 地址
  • 1

报错:”Could not read from remote repository.Please make sure you have the correct access rights.”

执行下面指令

ssh-keygen -t rsa -C "your_email@youremail.com"
  • 1

your_email是你的gitlab或者github上的email

一直回车

默认存在/root/.ssh/id_rsa.pub

cat ~/.ssh/id_rsa.pub
  • 1

复制粘贴到gitlab上即可

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/963658
推荐阅读
相关标签
  

闽ICP备14008679号