6
touch test
git add test
git commit -m "test"
git push -u origin master

This worked. The file was uploaded to the repository.

rm test
cp -R ../website ./website
git rm test
git add website/
git commit -m "Initial"
git push -u origin master

This did not give any output, and nothing seems to have bee done to the repository. The test file is still present in the repository.

$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
nothing to commit (working directory clean)

Can anyone assist?


Recreated the branch on both client and server, to no succes. It works when there's just one file inside, but it will simply not push the website folder to the server.

This is the only strange thing I can see; POST git-receive-pack (chunked)

RobinJ
  • 5,022
  • 7
  • 32
  • 61
  • 2
    Are you sure you need `-u` for push? What are your remotes? What does `git branch -v` prints? Are they the location that you are watching online? – rlegendi Sep 22 '12 at 18:39
  • "Your branch is ahead of 'origin/master' by 1 commit." is a strong indication that the second push didn't work. Try adding the `--verbose` option to `git push` to debug the problem. – user4815162342 Sep 22 '12 at 19:38
  • @rlegendi I dunno whether I need it. Someone on the #git IRC channel told me to do that. Anyway, without `-u` the same things happens. Which is to say; nothing happens. – RobinJ Sep 22 '12 at 21:27
  • @rlegendi `$ git branch -v` --> `* master 55cfce5 [ahead 1] Initial` – RobinJ Sep 22 '12 at 21:30
  • @user4815162342 http://paste.ubuntu.com/1221378/ – RobinJ Sep 22 '12 at 21:41
  • "The remote end hung up" means that the push failed. Check with your server administrator exactly what happened - maybe your credentials didn't check out, or there were some other problems on the server end. – user4815162342 Sep 22 '12 at 22:28
  • @user4815162342 Tried again this morning. This time the error did not appear, and it just stopped after the git-receive-pack thingy, without any further output. Again, nothing has been pushed to the server. – RobinJ Sep 23 '12 at 09:53
  • @RobinJ Hm, it might be a bitbucket issue, I found a [relevant thread for you](https://groups.google.com/forum/?fromgroups=#!topic/bitbucket-users/ubc46vTbHO4). I'd suggest contacting the guys in this google group, probably it is a known issue or they have a solution for it. – rlegendi Sep 23 '12 at 12:01
  • @rlegendi The error appeared just once, every other time it didn't return any error messages. – RobinJ Sep 23 '12 at 17:53
  • Can you try `git fetch` first, make sure the remote works correctly – Antoine Pelisse Oct 04 '12 at 08:19

6 Answers6

7

Looks like this is something to do with BitBucket. Another question here had the same issue: Hanging at "POST git-receive-pack (chunked)"

The solution is to use Git+SSH rather than HTTP. It seems to only affect repos with files over a few megabytes.

Community
  • 1
  • 1
akraut
  • 536
  • 1
  • 4
  • 17
  • When using SSH it actually shows me some progress, and it takes a really long time, so it looks like this could be the solution. Strange though, and a bit annoying that I have to use SSH keys (in my opinion they're more of an annoyance than a security measure). – RobinJ Oct 07 '12 at 17:35
  • Great! I think the SSH works when HTTP doesn't because you don't have to go through a webserver or proxy to connect to the git server. Though honestly, I'm not certain. – akraut Oct 07 '12 at 19:40
  • See this for instructions (look at more than just the accepted answer): http://stackoverflow.com/questions/7053608/how-to-use-git-extension-with-bitbucket-repository – David Russell Nov 01 '13 at 00:56
1

This does not look like a git error to me. If you are using exactly the commands you have shown, the contents of the ../website directory will not be copied to the ./website directory. Try doing a cp -R ../website ./website to copy all the contents.

Also, try doing a git status after copying to see if the changes reflect. Try adding everything in the repository directory to the git repo by doing git add .

Let me know the results of this operation. Also, I would appreciate it if you can update the question with your directory structure.

automaticAllDramatic
  • 2,025
  • 1
  • 21
  • 25
1

Generally, if your commit size is bigger than expected then you get chunked. You can see push output details by adding --verbose after push command.

Command below will fix the issue. It is the quickest way.

git config http.postBuffer 524288000
Burk
  • 2,969
  • 1
  • 23
  • 24
0

Simply try git push, you don't need to specify arguments, as you already used -u option once. Also from your output it seems that Bitbucket server could be down at that moment.

Anton Guryanov
  • 12,109
  • 1
  • 15
  • 16
  • Down at this moment, and each and every other moment from the moment I try to upload the website folder to my Git repository? – RobinJ Oct 03 '12 at 16:13
  • I added this answer before your edit, you didn't mention that you even tried recreating your repo – Anton Guryanov Oct 04 '12 at 14:41
0

One common cause of this is if you enter the wrong passphrase for your SSH key. Until you clear the cached credentials, git push will never work with that remote.

The command line git push origin master will do nothing, stalled, and produce no output.

SmartGit can 'cause' this by auto-filling the wrong password for your SSH key during the push. Clicking OK permanently breaks 'git push' until you go into Preferences and clear that credential out.

Lilith River
  • 16,204
  • 2
  • 44
  • 76
0

If you use persistent SSH connections, a stale connection could be the issue. It happened to me the first time today after a year of using persistent SSH. Open your .ssh/config and check the ControlPath, then go there and remove the corresponding file. For me it was /tmp/git@bitbucket.org:22

Maciej Swic
  • 11,139
  • 8
  • 52
  • 68