4

I've been working on a local git repository and everything has been working well. Today it was time to share the code, and I created a github repository, but I can't push to it. I tried all the compression and pruning methods I could find. This has happened before and my only solution was to create a new repo and move everything over and git init again. Since this has happened for a second time, I would really like to run this down.

 Tim$ git remote add origin git@github.com:tbbooher/cba_fitwit.git
 Tim$ git push -u origin master
Counting objects: 7964, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2915/2915), done.
Read from remote host github.com: Connection reset by peer
fatal: The remote end hung up unexpectedly
error: pack-objects died of signal 13
error: pack-objects died with strange error
error: failed to push some refs to 'git@github.com:tbbooher/cba_fitwit.git'

On the same machine (MacBook Pro), I'm able to push and pull with four other repos, but I still suspect some ssh trickery. Compressing happens very quickly, then everything slows way down at this point, and creeps along to about 11% and then fails as above.

Writing objects:  10% (865/7964), 2.37 MiB | 203 KiB/s   
bonhoffer
  • 1,421
  • 2
  • 23
  • 38
  • possible duplicate of [Why does git push fails with "Operation timed out"?](http://stackoverflow.com/questions/3140715/why-does-git-push-fails-with-operation-timed-out) – Marcin Gil Oct 17 '11 at 11:18

2 Answers2

2

Try using a https:// address instead of the git one.

p4010
  • 943
  • 7
  • 19
  • 1
    AFAIK, you can't push using https or git protocol. You have to use ssh. – svick Oct 17 '11 at 19:16
  • this fails too:remote add origin https://tbbooher@github.com/tbbooher/cba_fitwit.git Tim$ git push -u origin master – bonhoffer Oct 17 '11 at 22:34
  • i also created an entirely new repo with the same result – bonhoffer Oct 17 '11 at 22:50
  • @svick: nope, recently https also supports pushes (and it has also some speed advantages over ssh): see http://cl.ly/2H0V3x3s3s2z3R2w3O2L/Screen_Shot_2011-10-18_at_9.14.55_AM.png – p4010 Oct 18 '11 at 07:17
  • 1
    @bonhoffer: is the problem still present if you connect to the internet via a different network (e.g. home ISP)? – p4010 Oct 18 '11 at 07:20
  • i'll have to go to a local wifi and explore . . . and the https:// was removed from my comment above, but it is there :) – bonhoffer Oct 18 '11 at 10:08
  • Thanks for your comment. It pointed me in the right direction. – bonhoffer Oct 21 '11 at 13:58
2

This is an issue with my router. I went to a new location and everything pushes just fine, now I am curious how to correct my router.

It is interesting to note, that once I did the initial push, the router can handle it just fine.

bonhoffer
  • 1,421
  • 2
  • 23
  • 38
  • But you say that pushing to different repos works? Even behind the same router? Second question: What about ssh-ing to a machine somewhere? Does ssh on port 22 work at all? – Unapiedra Oct 21 '11 at 14:01
  • 4
    Some routers perform packet inspection to detect malware or dangerous sequences. This is probably your case: that's why this only happens on a single repo (which apparently has some misleading character sequence) and not on all of your repos. So, if your router has any "security" related option, try disabling it. – p4010 Oct 21 '11 at 14:58