Permission denied (publickey)

文问题:
xxx@gerrit.com:Permission denied (publickey).
fatal: Could not read from remote repository.

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

解决:
1、在.ssh文件夹下创建config文件,没用后缀名
2、往config文件里配置

# GERRIT
Host gerrit仓库域名
  HostName errit仓库域名
   PubkeyAcceptedKeyTypes +ssh-rsa
   User  gerrit用户名
   PreferredAuthentications publickey
   IdentityFile ~/.ssh/id_rsa
  Port 29418

![效果图](1_Permission denied (publickey).png)

posted @ 2023-12-04 18:12  胡姐姐  阅读(129)  评论(0编辑  收藏  举报