个人记录 Ubuntu下Git出现无法认证问题 - 草率大意

64 阅读1分钟

当我生成了密钥并在github配置好后拉取仓库出现:fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 一通鼓捣无解后我发现我使用的腾讯云轻量级默认用户是lighthouse,而我git clone前加了sudo提升权限,所以git clone用的是root,自然匹配不上密钥。 生成一个root的密钥即可。