Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

ubuntu - git impossible to push after add

Ok, I've a trouble that I'm not able to fix since some week. I use git (on github) to store my projects. Recently I've added some new files in it without problems, but, when I use "git push" I've a timeout error.

I use Ubuntu 12.04, with ssh (default) and https.

So, I decide to make fresh copy of the depo (git clone). After this I modify an existing file, commit it and push it ... with success !

So, I add the others (in the new copy), commit them and push them. And the problem come again: unable to push Here is the console output:

time git push
Counting objects: 13, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 16.61 KiB, done.
Total 11 (delta 2), reused 0 (delta 0)
^C

real    7m59.383s
user    0m0.008s
sys 0m0.004s

I really don't understand what i doing wrong here. I in other depo, same problem, but my collaborator don't have any troubles.

I remove git, and reinstall it with no change.

If you have any idea to solve this.

edit 1

git remote -v

origin  [email protected]:Krozark/projet_compilation.git (fetch)
origin  [email protected]:Krozark/projet_compilation.git (push)

edit: Solution

sudo ifconfig [wlan0] mtu 1460 (lower than 1500)
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I saw this exact same problem that a colleague was having and it was network related with SSH, we were using a VPN connection at the time and it ended up being the network MTU setting being too high (it was 1492 if I remember correctly), we tinkered around with smaller values until it started working. So something to do with network packet splitting it seemed.

Not sure if this is the case for you however although it doesn't hurt to try change your network MTU to a lower value to see if it works.

Of course if it's an issue on Github's side, this won't be a factor (the fact you can create a new repo and push up leads me to believe it's not MTU related).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...