700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > git问题:Please make sure you have the correct access rights and the repository exists.

git问题:Please make sure you have the correct access rights and the repository exists.

时间:2022-03-13 05:15:40

相关推荐

git问题:Please make sure you have the correct access rights and the repository exists.

当遇到如标题所示问题,打开终端

MBP:baiyunshen_rn lianyu02$ git pullgit@: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.

遇到这种问题怎么处理?很简单

如下:

ssh-keygen -t rsa -C "fangcaiwen",//fangcaiwen是你git操作的账号。Generating public/private rsa key pair.Enter file in which to save the key (/Users/lianyu02/.ssh/id_rsa): //回车Enter passphrase (empty for no passphrase): //回车Enter same passphrase again: //回车Your identification has been saved in /Users/lianyu02/.ssh/id_rsa.Your public key has been saved in /Users/lianyu02/.ssh/id_rsa.pub.The key fingerprint is:SHA256:oXm37ngA1/jn+dHYsSTrePXNvT9hHEqdjl1ktdW8Z2w fangcaiwenThe key's randomart image is:+---[RSA 2048]----+|.=||B|| .o .=o||.oo.. . =E||ooS.. ..*=+|| ......o+@o|| ..o o=oB|| o. =. o=|| .oo..o..=|+----[SHA256]-----+

然后再执行,

cat /Users/lianyu02/.ssh/id_rsa.pub //这个路劲在你上面不断回车里可以找到结果是:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC9+KpKzJKJjFkFABmSAPX74Rjn5qh3jQfbhbXppvIOTMU2fd/ribLQ+mP5Dj89IRAKGyQ/+vwyq0O6Y1e92Rst+Uyd9dgxk+CqK+fAsaHoVF9yCyJBA5eY6IiX5Vh5sbWHKsMfJUNt2rp9MjXrMJjkrxjCaa74iXeUvE9eN3ZRbxyehLP+EOv2nakxyvdao3moiWVHpJb1HdIoJQg9AGz5XqE6BLxegrpte0KJ+knnZtY1FE2Q7WvC/9pu9/IA7JWC8M85CcldR/iwRSDKn9bJesWIi0Og9tRAkRvSEQlr4lSL7fvlPDAV19tIRZ2itpD7uUESjFld05u0MMZjsMN7 fangcaiwen

如果你是gitlab出现这个问题,(github也一样)找到设置,点击SSH keys

如图所示:

按箭头所示.jpg

按图中箭头处粘贴上面的结果,点击增加Add key,然后回终端git pull,完美解决问题

链接:/p/c3089a7a7012

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。