Permission denied (publickey,gssapi-with-mic). fatal: Could not read from remote repository.

这两天电脑进水了,换了台笔记本电脑,配置好 git 的 ssh 之后,发现还是无法从远端仓库拉取代码,提示 Permission denied (publickey,gssapi-with-mic). fatal: Could not read from remote repository.后来发现有些 mac 系统不支持 rsa 算法,需要在 .ssh/config 增加一些配置才行

Permission denied (publickey,gssapi-with-mic).
fatal: Could not read from remote repository.

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

在 .ssh/config 中添加如下配置

Host *
    HostkeyAlgorithms +ssh-rsa
    PubkeyAcceptedAlgorithms +ssh-rsa
posted @ 2023-01-05 17:23  Lucky小黄人^_^  阅读(229)  评论(1)    收藏  举报