Laravel + Angular项目提交错误:src refspec master与任何

时间:2018-02-23 13:34:29

标签: git-commit git-refspec

有一个项目使用角度和laravel编码。我从服务器下载到本地。做了一些清洁后,试着去做git。但是每次我在标题上指定时都会看到相同的错误。 经过一些测试,当我在这里寻找相同的错误时,我无法找到任何解决方案。有我的步骤:

   1. cd sysGarden
   2. git init
   3. git add .
   4. git commit -m "first commit"
   5. git remote add origin git@github.com:biyro02/sysGarden.git
   6. git push -u origin master

在最后一步之后,我看到了错误。我在github上有一个帐户。您可以查看:https://github.com/biyro02/sysGarden 在git bash上,我使用我的用户名和密码登录。一切都好,但我看到错误。请帮我。这是我的第一个git提交。我准备好分享我的所有信息。只是,我想超越这个问题。

编辑:我执行" git branch"结果:*主人

编辑2:我收到以下错误:

   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

1 个答案:

答案 0 :(得分:0)

您应该可以通过再次运行以下命令来解决此问题。

git add .
git commit -m 'Commit Message Here'
git push -u origin master 

您也可以尝试git push origin HEAD:master,如果您需要更多信息要分享,可以尝试git show-ref查看更详细的本地分支信息。

这个问题很可能是因为未上传/未跟踪的文件,或者因为您当前的分支与您正在推送的分支不同,但我无法确定。

相关问题