使用git,push报错如下:
git@gitee.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
解决办法:
在C:\Users\***\.ssh里创建config文件(没有后缀,文件名就叫config),打开该文件,输入以下内容:
Host gitee.com
HostkeyAlgorithms +ssh-rsa
PubkeyAcceptedAlgorithms +ssh-rsa
当使用Git推送代码时遇到权限被拒绝的问题,可以通过在用户主目录的.ssh文件夹下创建config文件来解决。配置文件内容包括Host、HostkeyAlgorithms和PubkeyAcceptedAlgorithms,指定为ssh-rsa算法。这样做确保了正确的访问权限并使仓库存在。
1463

被折叠的 条评论
为什么被折叠?



