> git push -u origin masterPermission denied (publickey).fatal: Could not read from remote repository.
Please make sure you have the correct access rightsand the repository exists.
$ git pullPermission denied (publickey).fatal: Could not read from remote repository.
Please make sure you have the correct access rightsand the repository exists.
ERROR: git@github.com: Permission denied (public key). fatal: Could not readfrom remote repository. Please make sure you have the correct accessrights
解决方案(OSX)
打开您的终端并按照以下命令操作
$cd~
$sudo su
$ssh-keygen
输入保存密钥的文件(/var/root/. ssh/id_rsa):$id_rsa
输入密码(没有密码为空):$点击回车
再次输入相同的密码:$点击回车
$cd~/. ssh
$猫id_rsa.pub
复制显示内容。
打开GitHub单击您的个人资料图标设置>SSH和GPC密钥
点击新的ssh键按钮
输入您复制的任何标题和密钥
现在检查您的问题已解决
解决方案#2
ERROR 2: remote: Password authentication is not available for Git operations.remote: You must use a personal access token or SSH key.remote: See https://github.compnay.com/settings/tokens or https://github.compnay.com/settings/sshfatal: unable to access 'https://github.company.com/repo/app.git/': The requested URL returned an error: 403