您好,欢迎来到年旅网。
搜索
您的当前位置:首页如何解决git@github.com: Permission denied (publickey)异常

如何解决git@github.com: Permission denied (publickey)异常

来源:年旅网

一、错误信息描述

git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

原因:
权限被拒绝(公钥)。致命错误:无法从远程存储库读取。请确保您具有正确的访问权限并且存储库存在。

二、解决办法

2.1、获取本地SSH Key

  • 先执行ssh-keygen -t rsa -C ‘your-emailXXXX@example.com’, 看本地是否存在ssh key
  • 若本地存在,直接执行cat ~/.ssh/id_rsa.pub 获取,执行命令后如下

2.2、将本地的SSH Key添加到github

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- oldu.cn 版权所有 浙ICP备2024123271号-1

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务