在GitHub上设置回购 - 在推出-u原点主设备时出错 [英] Setting up repo on GitHub - Error on push -u origin master

查看:93
本文介绍了在GitHub上设置回购 - 在推出-u原点主设备时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在GitHub上设置我的第一个Git Repository。我一直在关注GitHub网站这里的文档。直到最后一个命令为止,我得到了一切: git push -u origin master 。它给了我以下错误:

pre $ 致命错误:断开:没有支持的认证方法可用(服务器发送:publickey)
致命:远程终端意外挂断

我不知道这意味着什么。这是我得到的与文档指出的唯一不同的输出。我似乎无法在网上找到任何具有此相同错误的内容,并解释它的意义,同样重要的是我需要做些什么来修复它。我希望建立一个可爱的Java帮助程序库,所以任何帮助都将不胜感激!

解决方案

错误消息告诉使用以下命令尝试登录GitHub:

 

code> $ ssh -T git@github.com

也许你已经忘记让你的已知使用 ssh-add path / to / key



的SSH密钥为此,请使用以下代码它避免了无法打开连接到您的身份验证代理程序的问题):

$ p $ $ exec ssh-agent bash
bash $ ssh-add / path / to / key

查看 http://help.github.com/ssh-issues/ 解决SSH问题。



在Windows上,使用 openssh 作为GitHub仅提供对openssh的支持,它可在此处获得:http://sshwindows.sourceforge.net/


I'm trying to set up my first Git Repository on GitHub. I've been following the documentation on GitHub's website here. I get everything right up until the very last command: git push -u origin master. It gives me the following error:

FATAL ERROR: Disconnected: No supported authentication methods available (server sent: publickey)
fatal: The remote end hung up unexpectedly

I have no idea what this means. This is the only output I get that differs from what the documentation indicates. I can't seem to find anything online that has this same error and explains what it means and just as importantly what I need to do to fix it. I'm hoping to put up a sweet Java Helper Library, so any help would be greatly appreciated!

解决方案

The error message tells you that you cannot connect properly.

Try logging into GitHub with the following command:

$ ssh -T git@github.com

Maybe you have forgotten to make your SSH key known using ssh-add path/to/key?

To do so, use the following code (which avoids the "Could not open a connection to your authentication agent." problem):

$ exec ssh-agent bash
bash$ ssh-add /path/to/key

See the GitHub docs over at http://help.github.com/ssh-issues/ to resolve the SSH issues.

On Windows, use openssh as "GitHub only provides support for openssh.", it is available here: http://sshwindows.sourceforge.net/

这篇关于在GitHub上设置回购 - 在推出-u原点主设备时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆