Giter VIP home page Giter VIP logo

Comments (10)

spesnova avatar spesnova commented on July 21, 2024 1

@jacobbednarz Hi, I had the same error before.
In my case, receiver script caused the error.
I think receiver script must receive STDIN from gitreceive.

Following reciever script works for me.

#!/bin/bash

APP=$1
REVISION=$2
USER=$3

echo "----> Unpacking repo..."
mkdir -p /tmp/build/$APP && cat | tar -x -C /tmp/build/$APP

from gitreceive.

jkiesele avatar jkiesele commented on July 21, 2024

Hi,

I just ran into the same problem, tried fiddling around with the receiver script to add some debug output, and noticed a strange thing:

If the receiver script has a newer timestamp then the latest push, it works!
Without understanding the issue, I added one line to the receiver script:
touch $0

Now it works like a charm. I didn't have too much time to dig into the reason for that, but maybe someone here can tell.

Cheers

from gitreceive.

jacobbednarz avatar jacobbednarz commented on July 21, 2024

Hmm, never chcked the timestamps but perhaps my client was in front of the server time and that caused an issue?

Thanks for the heads up though! I will have a bit of a look and see if I can expand more on my issue after checking the timestamps.

from gitreceive.

DeltaWhy avatar DeltaWhy commented on July 21, 2024

I am having the same problem. Having a lot of difficulty debugging it but it looks like the git archive command in the hook fails with exit status 141. This may be a separate issue since touching the receiver script does nothing for me.

Running git version 1.9.1 on the server and 2.2.2 on the client.

from gitreceive.

jacobbednarz avatar jacobbednarz commented on July 21, 2024

I've debugged this and the only way I was able to continue replicating this was to have commented out code (or nothing) in the receiver like the default shows.

The only thing I can put this down to is that the script is expecting a return value and it's not getting it by default. I think to prevent new users from hitting this snag, we should update the default receiver to output and exit with a 0 status.

Thoughts? I'm happy to throw together a pull request if everyone agrees.

from gitreceive.

jacobbednarz avatar jacobbednarz commented on July 21, 2024

Added a pull request in hope that it will be reviewed and this little hurdle is removed for other users.

from gitreceive.

ccravens avatar ccravens commented on July 21, 2024

After messing with it for a while I found out because I wasn't handling the tar file and producing a working version of the repository the script would hang. I removed the following from line 115 in gitreceiver script:

git archive "$newrev" |

That prevents archiving the new revision and piping the resulting tarfile to the gitreceiver script.

from gitreceive.

progrium avatar progrium commented on July 21, 2024

Well that is the whole point of this project, so removing that line means
you basically don't want this project.

On Fri, Apr 24, 2015 at 6:33 AM, Chad Cravens [email protected]
wrote:

After messing with it for a while I found out because I wasn't handling
the tar file and producing a working version of the repository the script
would hang. I removed the following from line 115 in gitreceiver script:

git archive "$newrev" |

That prevents archiving the new revision and piping the resulting tarfile
to the gitreceiver script.


Reply to this email directly or view it on GitHub
#36 (comment).

Jeff Lindsay
http://progrium.com

from gitreceive.

EnricoSottile avatar EnricoSottile commented on July 21, 2024

I experienced the same problem until i tried the solution pointed by spesnova, which worked for me.
However, i still cannot push the tags as explained in this issue. .#38

from gitreceive.

hgilani avatar hgilani commented on July 21, 2024

I was also facing this error and on inspecting script I found out that trigger_receiever method has following logic.

    [[ "$refname" == "refs/heads/master" ]] && \
      git archive "$newrev" | "$home_dir/receiver" "$repo" "$newrev" "$user" "$fingerprint"

What this means is that you can only push master branch and the code comments explicitly says to disable this condition if you want to push other branches. Since I was pushing non master branch removing this condition fixed the issue.

from gitreceive.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.