小技巧

git遇到的问题

2017-09-06  本文已影响11人  CYC666

执行 git push origin master 操作会报该错误:

Permission denied (publickey).

fatal: Could not read from remote repository.

问题:我已经在github上传了SSH公钥,但是却没有在本地添加SSH

解决方法:在本地添加我生成的SSH文件

比如我现在已经在当前文件夹找到了SSH文件

执行:ssh-add 13705038428SSH

就可以了

=====================================

问题:

hint: Updates were rejected because the tip of your current branch is behind

hint: its remote counterpart. Integrate the remote changes (e.g.

hint: 'git pull ...') before pushing again.

hint: See the 'Note about fast-forwards' in 'git push --help' for details.

当前路径并非git路径😆真尴尬,网上一片解说,贼菜

=====================================

问题 : Permission denied (publickey).

             fatal: Could not read from remote repository.

git目录下的SSH和公钥不能删,删了就会出现这个错误

解决:重新生成SSH,上传到github,本地再次添加SSH就好了

曹老师8428

上一篇 下一篇

猜你喜欢

热点阅读