Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
为什么我不能将我的laravel项目推到github_Git_Github - Fatal编程技术网

为什么我不能将我的laravel项目推到github

为什么我不能将我的laravel项目推到github,git,github,Git,Github,我已经做了讨论论坛,但我不能把我的项目推到github,我已经尝试了所有的方法,但仍然不起作用 我已经在github中设置了ssh密钥 root@miky-Lenovo-ideapad:/opt/lampp/htdocs/discussionforum# git remote add origin git@github.com:milan2056/discussionforum.git root@miky-Lenovo-ideapad:/opt/lampp/htdocs/discussionfo

我已经做了讨论论坛,但我不能把我的项目推到github,我已经尝试了所有的方法,但仍然不起作用

我已经在github中设置了ssh密钥

root@miky-Lenovo-ideapad:/opt/lampp/htdocs/discussionforum# git remote add origin git@github.com:milan2056/discussionforum.git
root@miky-Lenovo-ideapad:/opt/lampp/htdocs/discussionforum# git push -u origin master
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

我需要将我的项目上传到github

github确实有一些可以找到的针对此错误的测试步骤。鉴于错误和url,在生成SSH密钥时可能未正确配置某些内容。我会确保在您的设置中,它表明您在过去实际使用过该ssh密钥

我以普通用户的身份生成私钥,并以root用户的身份推送项目,因此出现了此错误

您能否尝试运行以下命令:
ssh-vgit@github.com
和您的问题,并添加输出。是否希望在按下时询问您的用户名/密码?(帮助将其还原为https),或者在github上设置ssh密钥时需要帮助吗?可能重复