无法推送到GitHub

时间:2013-01-18 16:23:44

标签: git github connection

首先,是的,这是wrongly closed question的完全重复。

我有完全相同的问题和原始海报一样(就像他一样,除了他这个问题我还没有找到其他人)。

我一直在努力解决这个问题超过1个月,甚至不得不求助于使用bitbucket(工作正常),即使我在GitHub上有付费计划,所以请耐心等待。不,这与维护有很强的关系(目前在https://status.github.com/上一切正常,我仍然得到与Vulpo相同的错误)。

我的用户名和密码都不包含特殊字符。

我也可以使用不同的计算机正常推送,所以是的,这必须要使用我的电脑。我正在运行Arch Linux,这是我的git config -l

alias.s=status
user.name=Gustavo Machado
user.email=gdmachado@me.com
credential.helper=cache
color.ui=auto
color.branch.current=yellow reverse
color.branch.local=yellow
color.branch.remote=green
color.diff.meta=yellow bold
color.diff.frag=magenta bold
color.diff.old=red bold
color.diff.new=green bold
color.status.added=yellow
color.status.changed=green
color.status.untracked=cyan
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://github.com/gdmachado/paradigmas-de-programacao.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master

启动一个新的git文件夹并只推送一个README文件可以正常工作,但是一旦我尝试推送我的文件,它就会挂起一段时间然后返回错误:

-%- src/paradigmas-de-programacao ‹master➔› » git push -u origin master
Username for 'https://github.com':
Password for 'https://gdmachado@github.com': 
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 1.30 KiB, done.
Total 5 (delta 0), reused 0 (delta 0)
error: RPC failed; result=52, HTTP code = 0
fatal: The remote end hung up unexpectedly
fatal: recursion detected in die handler
Everything up-to-date

即使它显示everything up-to-date,也没有任何内容被推送到远程服务器。

SSH也不起作用。这是ssh -v git@github.com

的输出
OpenSSH_6.1p1, OpenSSL 1.0.1c 10 May 2012
debug1: Reading configuration data /home/gustavo/.ssh/config
debug1: /home/gustavo/.ssh/config line 1: Applying options for github.com
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug1: identity file /home/gustavo/.ssh/id_rsa type 1
debug1: identity file /home/gustavo/.ssh/id_rsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.5p1 Debian-    6+squeeze1+github8
debug1: match: OpenSSH_5.5p1 Debian-6+squeeze1+github8 pat OpenSSH_5*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.1
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-ctr hmac-md5 none
debug1: kex: client->server aes128-ctr hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Server host key: RSA 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48
debug1: Host 'github.com' is known and matches the RSA host key.
debug1: Found key in /home/gustavo/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/gustavo/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: read PEM private key done: type RSA
debug1: Authentication succeeded (publickey).
Authenticated to github.com ([207.97.227.239]:22).
debug1: channel 0: new [client-session]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: Remote: Forced command: gerve gdmachado     c8:d2:c3:fe:b1:81:72:50:9c:ff:fd:c0:88:40:00:4d
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Remote: Forced command: gerve gdmachado     c8:d2:c3:fe:b1:81:72:50:9c:ff:fd:c0:88:40:00:4d
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
PTY allocation request failed on channel 0
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
Hi gdmachado! You've successfully authenticated, but GitHub does not provide shell     access.
debug1: channel 0: free: client-session, nchannels 1
Connection to github.com closed.
Transferred: sent 2952, received 3000 bytes, in 0.5 seconds
Bytes per second: sent 6029.5, received 6127.5
debug1: Exit status 1

我在尝试使用github.com网站时也遇到了一些问题:我也无法使用该网站创建新的存储库;存储库名称检查需要很长时间,一段时间后会显示没有消息的红色警告。有时浏览repos需要永远,有时主网站甚至不加载。如果我尝试使用Chrome的隐身窗口(如没有Cookie /缓存)浏览网站,它可以在一段时间内完美运行(!!!),并在几分钟后再次停止工作。这很奇怪。我可以正常使用所有其他网站(也可以推送到bitbucket托管的其他git repos)。

我尝试暂时禁用iptables,但这并没有解决任何问题。

编辑:它在Windows 7上运行完全正常。这只发生在Arch Linux上:(

所以,由于我无法重新打开这个问题,有没有人知道这里会发生什么,所以我们可以删除我的问题并回答Vulpo的问题?谢谢!

1 个答案:

答案 0 :(得分:0)

你说SSH也行不通。但是,您刚刚证明SSH 工作 - 至少在端口22上。

https://help.github.com/articles/using-ssh-over-the-https-port

你得到了他们正在寻找的确切答案,即:

  

嗨gdmachado!您已成功通过身份验证,但GitHub没有   提供shell访问。

按照该链接上的说明使用端口443.如果有效,请按照建议强制使用,然后重试。