比如我在windows下用git clone gitURL 就提示 SSL certificate problem: self signed certificate in certificate chain 这种问题,在windows下出现得频率高些。我估计主要是git本身就是基于linux开发的,在windows上,容易缺失一些环境。 1.创建临时环境变量: windows上命令行输入: [plain] view plaincopy

set GIT_SSL_NO_VERIFY=true git clone
Linux下: [plain] view plaincopy

env GIT_SSL_NO_VERIFY=true git push
这里clon可以根据需要换成其他的git命令。 也可以把临时环境变量变为永久的,反正永远不验证ssl证书也没什么风险吧。。。

2.用git自带的配置命令: [plain] view plaincopy

git config --global http.sslVerify false
linux处理 git问题:Please make sure you have the correct access rights and the repository exists. 当遇到如标题所示问题,打开终端 MBP:baiyunshen_rn lianyu02$ git pull git@gitlab.intebox.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

遇到这种问题怎么处理?很简单 如下: ssh-keygen -t rsa -C "fangcaiwen",//fangcaiwen是你git操作的账号。 Generating public/private rsa key pair. Enter file in which to save the key (/Users/lianyu02/.ssh/id_rsa): //回车 Enter passphrase (empty for no passphrase): //回车 Enter same passphrase again: //回车 Your identification has been saved in /Users/lianyu02/.ssh/id_rsa. Your public key has been saved in /Users/lianyu02/.ssh/id_rsa.pub. The key fingerprint is: SHA256:oXm37ngA1/jn+dHYsSTrePXNvT9hHEqdjl1ktdW8Z2w fangcaiwen The key's randomart image is: +---[RSA 2048]----+ | .=| | B| | .o .=o| | .oo.. . =E| | ooS.. ..*=+| | ......o+@o| | ..o o=oB| | o. =. o=| | .oo..o..=| +----[SHA256]-----+

然后再执行, cat /Users/lianyu02/.ssh/id_rsa.pub //这个路劲在你上面不断回车里可以找到 结果是:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9+KpKzJKJjFkFABmSAPX74Rjn5qh3jQfbhbXppvIOTMU2fd/ribLQ+mP5Dj89IRAKGyQ/+vwyq0O6Y1e92Rst+Uyd9dgxk+CqK+fAsaHoVF9yCyJBA5eY6IiX5Vh5sbWHKsMfJUNt2rp9MjXrMJjkrxjCaa74iXeUvE9eN3ZRbxyehLP+EOv2nakxyvdao3moiWVHpJb1HdIoJQg9AGz5XqE6BLxegrpte0KJ+knnZtY1FE2Q7WvC/9pu9/IA7JWC8M85CcldR/iwRSDKn9bJesWIi0Og9tRAkRvSEQlr4lSL7fvlPDAV19tIRZ2itpD7uUESjFld05u0MMZjsMN7 fangcaiwen

如果你是gitlab出现这个问题,(github也一样)找到设置,点击SSH keys 如图所示:

按箭头所示.jpg

按图中箭头处粘贴上面的结果,点击增加Add key,然后回终端git pull,完美解决问题