tags:

views:

669

answers:

1

Hi,

I am on Mac OS X 10.5.5, and when I try to do a git push (I have installed git via git installer available on google code), it shows me the following error

Counting objects: 86, done.
Compressing objects: 100% (43/43), done.
Writing objects: 100% (84/84), 4.68 MiB | 48 KiB/s, done.
Total 84 (delta 37), reused 84 (delta 37)
*** Project description file hasn't been set
error: hooks/update exited with error code 1
error: hook declined to update refs/heads/master
To <my_git_server>:project_name.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to '<my_git_server>'

The mystery is that project description file is actually set, any idea why it might be behaving weird.

--
MI

+4  A: 

It is looking at the project description on the server; does <my_git_server>:project_name.git contain a file called description that contains something other than "Unnamed repository"?

If it does, and you're still having problems, you could disable the check for a description altogether; it's not essential. Comment out the following lines in project_name.git/hooks/update:

# check for no description
projectdesc=$(sed -e '1q' "$GIT_DIR/description")
case "$projectdesc" in
"Unnamed repository"* | "")
        echo "*** Project description file hasn't been set" >&2
        exit 1
        ;;
esac
Brian Campbell
I just logged into the server, changed description file and voila! it works :-) (btw, why didn't it accept my locally modified description file? why did I have to modify it on the server? any ideas?)I didn't want to comment the lines you suggested unless there was good reason to do so.
ishaq
Configuration files like project.git/config and project.git/description aren't synchronized between the client and the server, as they can differ; a server needs to be set up differently than the client. You could push to two different repos on the server, and they would need different descriptions.
Brian Campbell