从Eclipse推送到github存储库的问题:验证失败 [英] Problems with pushing to github repository from Eclipse: Auth fail
问题描述
我按照 Egit用户指南 ,但是我收到一条错误消息,并且验证失败。
I followed the steps from Egit user guide, but I get an error message with auth fail.
我做了什么:
我已经从窗口>首选项>网络连接> SSH2>密钥管理
到账户设置下的GitHub
What I do:
I have copied the public key from Window > Preferences > Network Connections > SSH2 > Key Management
to GitHub under account settings
然后我执行
Team>按
...
我输入 git@github.com:....
uri,然后点击下一步。但是,我收到错误:
Then I do
Team > Push
...
I enter the git@github.com:....
uri and click next. But then I get the error:
**Cannot get remote repository refs
Reason: git@github.com:.... : Auth fail**
可能是什么问题?
谢谢
推荐答案
旧问题,但供将来参考:
Old question, but for future reference:
确保你设置了一个push remote 。当我在推送...对话框中获得两个无法获取远程存储库引用 -problems(...密码为...和验证失败)时,它对我有用。
Make sure you did setup a push remote. It worked for me when I got both the Cannot get remote repository refs-problems ("... Passphrase for..." and "Auth fail" in the "Push..." dialog).
如果您已经有:
-
Github(窗口>首选项>常规>网络连接> SSH2)
Setup your SSH keys with Github (Window > Preferences > General > Network Connections > SSH2)
设置本地存储库(您可以按照本指南)
Setup your local repository (you can follow this guide for that)
创建了一个Github仓库(同一个指南)
Created a Github repository (same guide)
...这里是如何做到的:
... here's how you do it:
- 转到 Git Repositories视图(>窗口>显示视图>其他> Git存储库)
- 展开您的存储库,然后单击右键单击远程 - > 创建远程
- 远程名称:origin,配置推送:已选中 - > 点击确定
- 点击更改...按钮
- 粘贴您的git URI ,然后选择协议 ssh - > 单击完成
- ,点击保存并推送,现在您应该获得密码提示 - > 输入公钥密码(只要您DID(并且您应该)设置一个密码到你的公钥) - > 点击确定
- 现在你应该得到一个确认窗口,说推送到你的存储库 - 来源 - > 点击确定
- 推送到上游 ,但此次使用配置的远程存储库作为Destination Git存储库
- 去自己一杯好喝的咖啡!
- Go to the Git Repositories view (Window > Show View > Other > Git Repositories)
- Expand your Repository and right click Remotes --> "Create Remote"
- "Remote Name": origin, "Configure push": checked --> click "OK"
- Click the "Change..." button
- Paste your git URI and select protocol ssh --> click "Finish"
- Now, click "Save and Push" and NOW you should get a password prompt --> enter the public key passphrase here (provided that you DID (and you should) setup a passphrase to your public key) --> click "OK"
- Now you should get a confirmation window saying "Pushed to YourRepository - origin" --> click "OK"
- Push to upstream, but this time use "Configured remote repository" as your Destination Git repository
- Go get yourself a well earned cup of coffee!
这篇关于从Eclipse推送到github存储库的问题:验证失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!