Gitee下载代码权限问题

2021-01-17  本文已影响0人  小田BSP

在Ubuntu环境下,使用repo命令下载Gitee代码,遇到下面出错日志:

The authenticity of host 'gitee.com (212.64.62.183)' can't be established.
ECDSA key fingerprint is SHA256:FQGC9Kn/eye1W8icdBgrQp+KkGYoFgbVr17bmjey0Wc.
Are you sure you want to continue connecting (yes/no)? The authenticity of host                            
 'gitee.com (212.64.62.183)' can't be established.
ECDSA key fingerprint is SHA256:FQGC9Kn/eye1W8icdBgrQp+KkGYoFgbVr17bmjey0Wc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'gitee.com,212.64.62.183' (ECDSA) to the list of known hosts.
git@gitee.com: Permission denied (publickey).

Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
manifests:
Host key verification failed.
fatal: Could not read from remote repository.

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

git@gitee.com: Permission denied (publickey).
fatal: Could not read from remote repository.

解决方法:

ssh-keygen
cat /root/.ssh/id_rsa.pub

使用用户名登录Gitee,将/root/.ssh/id_rsa.pub文件中的内容拷贝到“设置”->“SSH公钥”->“公钥”,选择“确定”,重新下载。

image.png
image.png
上一篇下一篇

猜你喜欢

热点阅读