`git push` -- No output, nothing happens
Asked Answered
G

6

7
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)

Gaekwar answered 22/9, 2012 at 16:57 Comment(10)
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?Virga
"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.Lamp
@Virga 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.Gaekwar
@Virga $ git branch -v --> * master 55cfce5 [ahead 1] InitialGaekwar
@Lamp paste.ubuntu.com/1221378Gaekwar
"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.Lamp
@Lamp 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.Gaekwar
@Gaekwar Hm, it might be a bitbucket issue, I found a relevant thread for you. I'd suggest contacting the guys in this google group, probably it is a known issue or they have a solution for it.Virga
@Virga The error appeared just once, every other time it didn't return any error messages.Gaekwar
Can you try git fetch first, make sure the remote works correctlyPenny
C
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.

Curbstone answered 7/10, 2012 at 6:27 Comment(3)
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).Gaekwar
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.Curbstone
See this for instructions (look at more than just the accepted answer): #7054108Prominence
P
3

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
Prowler answered 12/5, 2022 at 11:0 Comment(0)
M
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.

Melena answered 4/10, 2012 at 7:29 Comment(4)
No, the wrong cp command was a typo in my question. shelr.tv/records/506dac239660807dc7000028 Directory tree following as soon as I remember the command.Gaekwar
These are probably your HTTPS credentials. Did you try this using the git+ssh protocol instead of https.Melena
Also, delete the auth~ directory. You do't need it.Melena
That's just an automatic backup my text editor makes when saving the auth file.Gaekwar
C
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.

Clearcut answered 3/10, 2012 at 13:14 Comment(2)
Down at this moment, and each and every other moment from the moment I try to upload the website folder to my Git repository?Gaekwar
I added this answer before your edit, you didn't mention that you even tried recreating your repoClearcut
A
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.

Anglo answered 31/12, 2013 at 21:0 Comment(0)
W
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/[email protected]:22

Winebaum answered 11/6, 2014 at 7:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.