代码拉取完成,页面将自动刷新
1. $ git push origin master git@gitee.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.1生成新的秘钥 $ ssh-keygen -t rsa -C "youremail@email.com" $ ssh-agent -s 1.2查看公钥 $ cat ~/.ssh/id_rsa.pub 然后复制此公钥到gitee中保存。 1.3验证连接 $ ssh -T git@gitee.com Hi dagger! You've successfully authenticated, but GITEE.COM does not provide shell access. 2.$ git push To gitee.com:wdz_dagger/test.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'gitee.com:wdz_dagger/test.git' 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. 解决方法: 2.1强制覆盖本地文件: git stash 保护工作现场 git pull --rebase origin master 本地恢复文件 git push -u origin master 推送 2.2 或者强制上传覆盖远程文件, git push -f origin master (这个命令在团队开发的时候最好不要用,否则可能会有生命危险) 2.3 git rebase --abort 回退版本 git pull origin master --allow-unrelated-histories 本地恢复文件 git status 查看master分支状态 git add xxx git commit -m xxx git push
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。