josegonzalez/php-git

Problem with bare repo

Closed this issue · 8 comments

Hello!

I want to use your interface on Bare repo as a viewer on my centralized server.
I have configured the project but it seems to have a problem with bare repo parsing.

Is it normal?
Have you experienced this kind of problem?

Thanks for your answer!

I use a OVH server if it can help :)

What exactly is the problem?
On Jun 19, 2012 6:50 PM, "Stéphane HULARD" <
reply@reply.github.com>
wrote:

Hello!

I want to use your interface on Bare repo as a viewer on my centralized
server.
I have configured the project but it seems to have a problem with bare
repo parsing.

Is it normal?
Have you experienced this kind of problem?

Thanks for your answer!


Reply to this email directly or view it on GitHub:
#7

I have configured the tool on my webserver.

In the core.php I put the repository folder with the repo suffix.
Then I have a first problem with the git owner retrieving. I go through this test by commenting the line.

The tool finally find a repo and show inside the home page.
When I select this repo and go inside, I just see nothing and inside the home page the last modification date is invalid.

I don't know if it's a bare repo problem but I think that was the only difference between me and a normal installation...

Thanks for your answer!

How do you create a bare repo?

To build a bare repo I use the following command lines:

mkdir ~/my-project
cd ~/my-project
touch .gitignore
git init
git add .
git commit -an

cd ~/my-project
git clone --bare . ~/my-project.git
cd ~/my-project.git
git --bare update-server-info
cd hooks/
mv post-update.sample post-update
chmod a+x post-update

scp -r ~/my-project.git me@ovh:~/
rm -Rf ~/my-project*

Hello Jose,

Have you tried to correct my bare problem?
Thanks!

There are (at least) two things to do before it will work with bare repos.
(1) As far as i've seen, the listing will only work, if there are already commits to the repo. Try cloning and making a first commit to it.
(2) Be sure to set the $CONFIG['repo_suffix'] = ""; in config/core.php. Bare repos don't have a /.git/ - subdirectory (AFAIK).

I'm no longer maintaining this repository. Pull requests welcome, but I won't be fixing any issues.