git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jean-Luc Herren <jlh@gmx.ch>
To: Oliver Kullmann <O.Kullmann@swansea.ac.uk>
Cc: git@vger.kernel.org
Subject: Re: how to use two bare repositories?
Date: Sat, 12 Apr 2008 01:19:53 +0200	[thread overview]
Message-ID: <47FFF219.1080707@gmx.ch> (raw)
In-Reply-To: <20080411222205.GN29940@cs-wsok.swansea.ac.uk>

Oliver Kullmann wrote:
> I have the following problem:
> 
> We use a public repository, a bare repository A,
> used with push and pull via ssh.
> A is only to be used by the core developer group.
> 
> Now I want to create another public repository B,
> from which anonymous pull is possible via http.
> So B should be another bare repository.
> 
> The problem is now that it seems not to be possible
> to update B:
> 
> 1. pulling from A is not possible since B is bare;
> 2. fetching from A seems to work, checking the content of
>    B via gitk seems to indicate that B has been updated
>  --- however pulling from B doesn't work: The newly
>  fetched changes are not transported to a repository
>  which pulls from B ???

Probably in your setup, B is tracking A as a remote and if you
fetch, only those remotes are updated, but not the local branches
in B.  If you then clone from B, you don't get B's remotes, you
get B's branches.  You probably want to do this:

path/to/B$ git remote rm origin
path/to/B$ git remote add --mirror origin path/to/A

Though, I wonder if it makes sense to have a 'git clone --bare'
set up the remote in mirror mode by default.  I'm unsure of what
use remotes are in a bare repo.

jlh

  parent reply	other threads:[~2008-04-11 23:20 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-11 22:22 how to use two bare repositories? Oliver Kullmann
2008-04-11 23:17 ` Junio C Hamano
2008-04-11 23:19 ` Jean-Luc Herren [this message]
2008-04-11 23:23 ` Oliver Kullmann
  -- strict thread matches above, loose matches on Subject: below --
2008-04-11 23:44 Oliver Kullmann
2008-04-12  0:12 ` Junio C Hamano
2008-04-12  0:42 ` しらいしななこ
2008-04-12  0:55   ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47FFF219.1080707@gmx.ch \
    --to=jlh@gmx.ch \
    --cc=O.Kullmann@swansea.ac.uk \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).