On Mar 31, 11:46 am, Konstantin Khomoutov
<flatw...@users.sourceforge.net> wrote:
> On Thu, 31 Mar 2011 09:01:13 -0700 (PDT)
>
>
>
>
>
>
>
>
>
> romerve <rome...@gmail.com> wrote:
> > > > I am new to Git and been using SVN for a little while. I have set
> > > > up Git and i am trying to clone a project via http and i am
> > > > getting:
>
> > > It seems you failed to paste what you're getting.
>
> > > > I also setup gitweb to see my projects via browser, everything is
> > > > working except for 2 things.
>
> > > > 1.- when i do: git init to any folder, gitweb shows the new
> > > > project but it shows it as "proj/.git" instead of just "proj"
>
> > > > and 2.- when i try to do: git clonehttp://git.mydomain.com/proji
> > > > get: "warning: remote HEAD refers to nonexistent ref, unable to
> > > > checkout."
>
> > > Most probably this happens because you've attempted to clone an
> > > empty repository, that is, a repository without any commits
> > > recorded yet. The explanation of why this happens is at [1]. I'm
> > > also quite confident the first problem (with gitweb's display of
> > > such repositories) exists due to the same reason.
> > Well here is what i have done:
> > cd webstore
> > git init
> > git add .
> > git commit -a -m "initial commit"
>
> > Then i go to git.mydomain.com and gitweb displays: "webstore/.git" and
> > when i try to clone it:
> > from remote client: git clonehttp://git.mydomain.com/webstorei get
> > the warning:
> > "warning: remote HEAD refers to nonexistent ref, unable to checkout."
>
> > So i know my project is not empty...
>
> Okay, so may it be that the problem is rooted in that you have to jump
> through a set of hoops to make "dumb" protocols like HTTP work [1]?
> I think you could try to verify this hypothesis immediately by
> attempting to clone via file:// protocol on that same host.
>
> P.S.
> Please don't top-post, it sucks big time.
>
> 1.http://www.kernel.org/pub/software/scm/git/docs/githooks.html#post-up...

I have done that. I did:
cd proj1
git init
git add .
git commit -a -m "test"
cd /srv/vhosts/
git clone --bare /srv/git/proj1
git --bare update-server-info
mv hooks/post-update.sample hooks/post-update

And i was getting the same error.

Now, i re-did the entire thing and i am getting a different error.

Docroot for web: /srv/vhosts/git.domain.com
git project root: /srv/git/

if i do:
git clone /srv/git/project1
mv project1 /srv/vhosts/git.domain.com/

or if i do
git clone --bare /srv/git/project1
mv project1 /srv/vhosts/git.domain.com/
cd /srv/vhosts/git.domain.com/project1/
git --bare update-server-info
mv hooks/post-update.sample hooks/post-update
chmod a+x hooks/post-update

I get: "fata: http://git.domain.com/project1/info/refs not found: did
you run git update-server-info on the server?"
The other difference between the 2 methods is that with the first one
gitweb show: "project/.git" and the second one it shows:
"project" (without /.git)

I have even done git --bare update-server-info -f and git update-
server-info -f

It doesnt change anything.

Now, if i do: git clone file:///srv/git/project1 it works fine,
however it complains about not being able to push..

Thanks

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To post to this group, send email to git-users@googlegroups.com.
To unsubscribe from this group, send email to 
git-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/git-users?hl=en.

Reply via email to