git:Clone failed: git: ‘permission denyed‘及Clone failed: git: ‘remote-https‘ is not a git command.

在centos中

1、Clone failed: git: 'permission denyed' , Could not read from remote repository.

问题原因:git没有设置公钥时,将git的帐号(邮箱)生成ssh key

 

 ssh-keygen -t rsa -C "[email protected]"

根据提示,找到/root/.ssh/id_rsa.pub

git:Clone failed: git: ‘permission denyed‘及Clone failed: git: ‘remote-https‘ is not a git command._第1张图片

将其中的内容填写到Gitee账号中的公钥中

安全设置中-SSH公钥,添加公钥,标题随便填,公钥内容即为id_rsa.pub中的内容,再进行拉取时就不再报权限问题了,出现的是remote-https的错误,继续看下面

git:Clone failed: git: ‘permission denyed‘及Clone failed: git: ‘remote-https‘ is not a git command._第2张图片

2、Clone failed: git: 'remote-https' is not a git command. See 'git --help'.

点开settings中,勾上clone git repositories using ssh,即可直接拉取项目

git:Clone failed: git: ‘permission denyed‘及Clone failed: git: ‘remote-https‘ is not a git command._第3张图片

你可能感兴趣的:(其它)