WebFaction
Community site: login faq

Hi all,

I've created a Git app for my Git repositories on my Webfaction account and created this Git post-receive hook:

#!/bin/sh
GIT_WORK_TREE=/home/myaccount/webapps/myapp git checkout -f
GIT_WORK_TREE=/home/myaccount/webapps/myapp git reset --hard

Which works, most of the time, fine. Sometimes, after pushing changes from my PC or laptop, I get this error:

remote: error: packfile ./objects/pack/pack-a33876434c44b530fedf8ff0b2132c8de895 e132.pack cannot be accessed

The commit(s) are successfully pushed, but the post-receive hook is not being executed. Any idea what causes this error (and how to fix it)? I've recreated the git repo several times and then it works, but after a while (a few hours / days / commits) the error is back.

Thanks.

asked 08 Nov '12, 17:18

Peter
1316
accept rate: 0%

edited 08 Nov '12, 17:22

This git commit contains an explanation of why these messages were downgraded from errors to warnings, suggesting that they're not a real problem. It seems to be a race condition, maybe related to how Apache handles the request.

(03 Nov '14, 04:58) ryans ♦♦

Try running git-fsck on the repo to check for corruption.

permanent link

answered 08 Nov '12, 17:33

johns
5.4k312
accept rate: 23%

Sorry, I forgot to mention that I already tried that.

(08 Nov '12, 17:49) Peter

Would it be possible to run the action with increased verbosity and submit the report as a support ticket so we can take a closer look?

(08 Nov '12, 18:02) johns

I have the same error. I've pinpointed it to the "git reset --hard" command. Without that, it I have no problems.

Any progress?

permanent link

answered 20 May '13, 15:08

mettienne
1
accept rate: 0%

Can you try running "git gc" in your repo directory?

(20 May '13, 15:22) seanf
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×111

question asked: 08 Nov '12, 17:18

question was seen: 7,170 times

last updated: 03 Nov '14, 04:58

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM