[email protected]: Permission denied (publickey). Could not read from remote repository.

[email protected]: Permission denied (publickey). Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

今天在拉取代码时出现了异常报错,如下图所示:
在这里插入图片描述
如何解决呢:
1、ssh-keygen -t rsa -C ‘邮箱地址’
2、后面是交互式的操作,可以不输入任何,直接enter键推进
3、cat ~/.ssh/id_rsa.pub 获得公钥
4、将公钥填写到服务端->设置SSH密钥,即可

猜你喜欢

转载自blog.csdn.net/qq_15283475/article/details/129488008