问题
First of all, yes, this is an exact duplicate of a wrongly closed question.
I have the exact same problem as the original poster (and just like him, I haven't been able to find anyone else except him with this problem).
I've been struggling with this problem for over 1 month now, and even had to resort to using bitbucket (which works fine), even though I have a paid plan on GitHub, so bear with me. And no, this has nothing to do with maintenance (currently everything is normal on https://status.github.com/, and I still get the same errors as Vulpo did).
Neither my username nor my password contain special characters.
I am also able to push normally using a different computer, so yes, this must have to do with my computer. I am running Arch Linux, and here is my 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
Starting a new git folder and pushing just a README file works fine, but as soon as I try to push my files, it simply hangs for a while and then returns an error:
-%- 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
Even though it says everything up-to-date, nothing has been pushed to the remote server.
SSH also doesn't work. This is the output of 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
I also get a number of problems when trying to use the github.com website: I also can't create a new repository using the website; the repository name checking takes very long, and after a while a red warning with no message is displayed. Sometimes browsing repos takes forever, and sometimes the main website doesn't even load. If I try to browse the website using a Chrome's incognito window (as in no cookies/cache) it works perfectly for a while(!!!), and after a few minutes stops working again. This is very weird. I can use all other websites (and also push to other git repos hosted in bitbucket for example) normally.
I tried temporarily disabling iptables, but that didn't solve anything.
Edit: It works perfectly fine on Windows 7. This only happens on Arch Linux :(
So, as I can't reopen that question, does anyone have an idea of what might be going on here, so that we can delete my question and answer Vulpo's? Thanks!
回答1:
You said SSH also doesn't work. However, you have just proven SSH does work--at least over port 22.
https://help.github.com/articles/using-ssh-over-the-https-port
You got the exact response they were looking for, which was:
Hi gdmachado! You've successfully authenticated, but GitHub does not provide shell access.
Follow the directions on that link with port 443. If that works, force it as they suggested, and try again.
来源:https://stackoverflow.com/questions/14403155/cannot-push-to-github