git认证证书问题解决方案(github clone "Permission denied (publickey). fatal: Could not read from remote reposi)

来源:互联网 发布:筑志红中麻将源码 编辑:程序博客网 时间:2024/05/20 22:40

1.ssh -v git@github.com

2. ssh-agent -s

3. ssh-add ~/.ssh/id_rsa

如果有报:Could not open a connection to your authentication agent. 

            3.1:eval `ssh-agent -s` 

在执行 3.2 :ssh-add ~/.ssh/id_rsa

4.将客户端生成的key添加到github账户


   首先使用 clip < ~/.ssh/id_rsa.pub  或者文本编辑拷贝id_rsa.pub文本内容

    到github右上角账户管理-Setting下面找到左侧“SSH and GPG keys”菜单,接着点击“Add SSH key”,在"title"栏输入一个自己喜欢的标题,“key”栏中粘贴刚刚复制的公钥内容,最后点击“Add key”按钮。


5.最后一步,验证key

[plain] view plain copy
  1. $ ssh -T git@github.com  
  2. Hi JsonJu! You've successfully authenticated, but GitHub does not provide shell  access. 


阅读全文
0 0
原创粉丝点击