无法使用 GIT 扩展推送到存储库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6138493/
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
Unable to push to repository using GIT Extensions
提问by Wotuu
I'm pulling my hair out right now because of this. I have downloaded and installed GIT, did the same for GIT Extensions (as we're going to be using it for VS2010), and everything worked fine and dandy. I committed changes, then found out my team members couldn't checkout from the website. Appears that I have to push my changes to the server.
因为这个,我现在正在拔头发。我已经下载并安装了 GIT,对 GIT 扩展做了同样的事情(因为我们将在 VS2010 中使用它),并且一切正常。我提交了更改,然后发现我的团队成员无法从网站结帐。看来我必须将更改推送到服务器。
So here's the deal. When I try to push to the github.com website, I get the following error message:
所以这就是交易。当我尝试推送到 github.com 网站时,收到以下错误消息:
"Authentication error The command resulted with an error that usually means that th PuTTy authenticaion agent is not running.or that the correct private key is not (yet) loaded.
“身份验证错误该命令导致错误,这通常意味着 PuTTy 身份验证代理未运行。或者(尚未)加载正确的私钥。
When the key is loaded, you can press retry. 'Retry' 'Load SSH key' 'Abort'"
加载密钥后,您可以按重试。'重试' '加载 SSH 密钥' '中止'"
I have created an SSH key, so I try to load it. I get to browse for my key, which I do. I press 'Load', then 'Retry'. Then, the same error appears.
我已经创建了一个 SSH 密钥,所以我尝试加载它。我可以浏览我的钥匙,我这样做了。我按“加载”,然后按“重试”。然后,出现同样的错误。
OK, so that doesn't work. I go to FileMenu Remotes -> PuTTY -> Start Authentication Agent. I get an error that it is already running, so that should be fine then. Going to Remotes -> PuTTY -> Generate or import key, shows me that it doesn't have a key loaded or anything, but I assume that that's fine as well then.
好的,这样就行不通了。我转到 FileMenu Remotes -> PuTTY -> 启动身份验证代理。我收到一个错误,它已经在运行,所以应该没问题。转到 Remotes -> PuTTY -> Generate or import key,向我展示它没有加载密钥或任何东西,但我认为那也很好。
Remotes -> Manage remote repositories. I get to see the URL of my repo, and the location of my .ssh key. Pressing 'Test Connection' will give me the following error:
远程 -> 管理远程存储库。我可以看到我的 repo 的 URL,以及我的 .ssh 密钥的位置。按“测试连接”会给我以下错误:
"Using username 'git' FATAL ERROR: Disconnected: No supported authentication methods available"
“使用用户名 'git' 致命错误:断开连接:没有可用的受支持的身份验证方法”
So here I am, I can't push to the server because of above issues. I always solve problems on my own or find solutions on Google, but I'm left in the dark here, it just won't work. Anything that would help me get out of this Source Code Management disaster would be awesome, because I could just about kill anyone now.
所以我在这里,由于上述问题,我无法推送到服务器。我总是自己解决问题或在谷歌上找到解决方案,但我在这里被蒙在鼓里,这行不通。任何能帮助我摆脱源代码管理灾难的东西都会很棒,因为我现在几乎可以杀死任何人。
Thanks!
谢谢!
Edit: I should note that the problems started when the push told me something like 'Unable to verify the server is actually the server, because I dont know the key of the server'. I then tried to troubleshoot that, which resulted in the above. Maybe that helps..
编辑:我应该注意到,当推送告诉我诸如“无法验证服务器实际上是服务器,因为我不知道服务器的密钥”之类的内容时,问题就开始了。然后我试图解决这个问题,导致了上述问题。也许这有帮助..
回答by Wotuu
Up front, I don't know if this has to do with it, but can't hurt to do. Go to Plugins -> Settings -> Github, and enter your details there. I found that it was blank there. What solved my problem is the following: In the .ssh folder that was under C:\Users\<my name>\.ssh, was my private key, as generated by the PuTTY program (.pkk file). What I did there was wrong, I shouldn't have created a new key.
在前面,我不知道这是否与它有关,但不能伤害这样做。转到插件 -> 设置 -> Github,然后在那里输入您的详细信息。我发现那里是空白的。解决我的问题的方法如下:在 C:\Users\<my name>\.ssh 下的 .ssh 文件夹中,是我的私钥,由 PuTTY 程序(.pkk 文件)生成。我在那里做的是错误的,我不应该创建一个新的密钥。
Go ahead to <Git Extensions> Remotes -> PuTTY -> Generate or import key. Now, go to Conversions -> Import key. Browse to the .ssh folder, and find 'id_rsa' (it was named exactly that here, WITHOUT an extension). Select it, and press open. Enter the password for your key (this is the key that Git uses to communicate to the GitHub server, as it appears). Then, select Save Private Key, and save it somewhere (I did in the .ssh folder).
继续 <Git Extensions> Remotes -> PuTTY -> Generate or import key。现在,转到转换 -> 导入键。浏览到 .ssh 文件夹,并找到“id_rsa”(它在此处完全命名,没有扩展名)。选择它,然后按打开。输入您的密钥的密码(这是 Git 用来与 GitHub 服务器通信的密钥,正如它所显示的那样)。然后,选择保存私钥,并将其保存在某处(我在 .ssh 文件夹中做过)。
Now, go on and Push your changes. Press <Manage>. There, browse to your newly created private key. Then press Test Connection. That worked for me, it said 'Using username 'Git'\n Hi vname>' etc. <Save>, and then hit <Push>. It then worked for me.
现在,继续并推送您的更改。按 <管理>。在那里,浏览到您新创建的私钥。然后按测试连接。这对我有用,它说'使用用户名'Git'\n Hi vname>'等等。<Save>,然后点击<Push>。然后它对我有用。
回答by Arialdo Martini
You could try using OpenSSH
instead of PuTTY.
您可以尝试使用OpenSSH
代替 PuTTY。
Open Settings
->Settings
menu in GitExtensions main windows, select the Ssh
tab and select OpenSSH
in Specify which ssh client to use
.
在 GitExtensions 主窗口中打开Settings
->Settings
菜单,选择Ssh
选项卡并OpenSSH
在Specify which ssh client to use
.
回答by Brambor
I'm using Git Extensions as well but only because the thing from GitHub is not for 32 bit Win... I found out that easiest way to push is to use the Git GUI itself which you have already installed (somewhere like "C:\Program Files\Git" but it should be in start menu under "Git" folder), so I'm working in Git Extensions pulling, clonning, merging, comiting and changing to master version then I just open Git GUI open my repository and push it (the master version - I'm not making others, yet) to GitHub! I know that isn't solution of not working program, but it's very easy and you don't have to install anything more :) Hope I helped someone!
我也在使用 Git 扩展,但仅仅是因为 GitHub 上的东西不适用于 32 位 Win……我发现最简单的推送方法是使用您已经安装的 Git GUI 本身(例如“C: \Program Files\Git”,但它应该在“Git”文件夹下的开始菜单中),所以我正在使用 Git Extensions 拉、克隆、合并、提交和更改主版本然后我只需打开 Git GUI 打开我的存储库和将它(主版本 - 我还没有制作其他版本)推送到 GitHub!我知道这不是不工作的程序的解决方案,但它非常简单,您不必再安装任何东西:) 希望我帮助了某人!
回答by koba
If you want to use PuTTY... A generated new keys: Remotes -> PuTTY -> Generate or import key and it works.
如果您想使用 PuTTY... 生成的新密钥: Remotes -> PuTTY -> Generate or import key 并且它可以工作。