git 使用 Eclipse 和 Egit 时,我无法推送到上游
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6351304/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
When using Eclipse and Egit I can not push to upstream
提问by Seth Hikari
Every time I try to push I get reject non-fast forward. If I push from the terminal it works just fine.
每次我尝试推动时,我都会被拒绝非快进。如果我从终端推送它工作得很好。
I am using Ubuntu Natty latest eclipse Egit plugin git https
我正在使用 Ubuntu Natty 最新的 Eclipse Egit 插件 git https
I would rather use ssh, but I can not get that to work either.
我宁愿使用 ssh,但我也不能让它工作。
回答by bbdlg
Windows->Preferences->Team->Git->Configuration->Repository Settings->Add Entry
Windows->首选项->团队->Git->配置->存储库设置->添加条目
Just add two key: 'merge' and 'remote' like the following pic.
只需添加两个键:“合并”和“远程”,如下图所示。
- key(branch.master.merge) -- value(refs/heads/master)
- key(branch.master.remote) -- value(origin)
- 键(branch.master.merge)--值(refs/heads/master)
- 键(branch.master.remote)--值(原点)
回答by Yeo
I am not sure whether this one can help... because I ever having problem when pushing in eclipse but not in cmd. So I try to modify the Eclipse network connection setting
我不确定这是否有帮助......因为我在推入 eclipse 而不是在 cmd 中时遇到了问题。于是我尝试修改Eclipse网络连接设置
- Go to Window -> Preference
- General -> Network Connection --> SSH2
- The problem could be inside there.
- 转到窗口 -> 首选项
- 常规 -> 网络连接 -> SSH2
- 问题可能出在里面。
Or if it doesn't work,..
或者如果它不起作用,..
have you try again to re-setup, and Follow the guide http://wiki.eclipse.org/EGit/User_Guideexactly
您是否再次尝试重新设置,并完全按照指南http://wiki.eclipse.org/EGit/User_Guide
Hope it helps, Good luck, :)
希望有帮助,祝你好运,:)