所以我今天在终端打开了我的rails项目并进行了一些更改并尝试推送到github,但它不起作用。我在谷歌上搜索和堆栈溢出,所有人都指向安装 github 的说明来解决我的问题。
因此,我浏览了所有说明,但仍然遇到同样的问题。请帮忙!
admin@new-host-2:~/Desktop/sample_app$ git status
# On branch filling-in-layout
# Your branch is ahead of 'origin/filling-in-layout' by 3 commits.
#
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: app/views/pages/home.html.erb
#
no changes added to commit (use "git add" and/or "git commit -a")
admin@new-host-2:~/Desktop/sample_app$ git add .
admin@new-host-2:~/Desktop/sample_app$ git commit -am 'testing git yet again'
[filling-in-layout b607a16] testing git yet again
1 files changed, 1 insertions(+), 1 deletions(-)
admin@new-host-2:~/Desktop/sample_app$ git push
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
admin@new-host-2:~/Desktop/sample_app$ ssh-add -l
The agent has no identities.
admin@new-host-2:~/Desktop/sample_app$ git credential-osxkeychain
Usage: git credential-osxkeychain <get|store|erase>
另外为什么它说#你的分支在 'origin/filling-in-layout' 之前 3 次提交?