git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Cloning remote HTTP repository: Can only see 'master' branch
@ 2013-01-29  5:54 Michael Tyson
  2013-01-29  8:23 ` Jeff King
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Tyson @ 2013-01-29  5:54 UTC (permalink / raw)
  To: git

Hello!

I've a readonly git repository that I'm hosting via HTTP (a bare git repository located within the appropriate directory on the server). I push to it via my own SSH account (local repository with a remote pointing to the ssh:// URL).

This has all worked fine so far - I push via ssh, and others can clone and pull via the HTTP URL.

I've recently added a branch - "beta" - which pushed just fine, but now cloning via the HTTP URL doesn't seem to show the new branch - just master:

$ git clone http://server.tld/path/to/repository.git repository
Cloning into 'repository'...
$ cd repository
$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master

Cloning via the readwrite ssh URL works fine though:

$ git clone ssh://user@server.tld:www/path/to/repository.git repository
Cloning into 'repository'...
stdin: is not a tty
remote: Counting objects: 225, done.
remote: Compressing objects: 100% (196/196), done.
remote: Total 225 (delta 109), reused 77 (delta 25)
Receiving objects: 100% (225/225), 9.55 MiB | 295 KiB/s, done.
Resolving deltas: 100% (109/109), done.
$ cd repository
$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/beta
  remotes/origin/master

I've tried 'git clone --mirror' just in case, but this just resulted in a bare repository with only the 'master' branch, still.

Anyone have any ideas about what I'm doing wrong?

Cheers,
Michael

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cloning remote HTTP repository: Can only see 'master' branch
  2013-01-29  5:54 Cloning remote HTTP repository: Can only see 'master' branch Michael Tyson
@ 2013-01-29  8:23 ` Jeff King
  2013-01-30  0:06   ` Michael Tyson
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff King @ 2013-01-29  8:23 UTC (permalink / raw)
  To: Michael Tyson; +Cc: git

On Tue, Jan 29, 2013 at 04:54:13PM +1100, Michael Tyson wrote:

> I've a readonly git repository that I'm hosting via HTTP (a bare git
> repository located within the appropriate directory on the server). I
> push to it via my own SSH account (local repository with a remote
> pointing to the ssh:// URL).
> 
> This has all worked fine so far - I push via ssh, and others can clone
> and pull via the HTTP URL.
> 
> I've recently added a branch - "beta" - which pushed just fine, but
> now cloning via the HTTP URL doesn't seem to show the new branch -
> just master:

If you are using the "dumb" http protocol (i.e., the web server knows
nothing about git, and just serves the repo files), you need to run "git
update-server-info" after each push in order to update the static file
that tells the git client about each ref. You can have git do it
automatically for you by setting receive.updateServerInfo in the server
repo's config.

If the server is yours to control, consider setting up the "smart" http
protocol, as it is much more efficient. Details are in "git help
http-backend".

-Peff

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Cloning remote HTTP repository: Can only see 'master' branch
  2013-01-29  8:23 ` Jeff King
@ 2013-01-30  0:06   ` Michael Tyson
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Tyson @ 2013-01-30  0:06 UTC (permalink / raw)
  To: git@vger.kernel.org

Ah!  Lovely, thank you, Jeff!

Alas, it's a shared server so I'm limited to what the host provides, but that solves my problem.

Cheers!


On 29 Jan 2013, at 19:23, Jeff King <peff@peff.net> wrote:

> On Tue, Jan 29, 2013 at 04:54:13PM +1100, Michael Tyson wrote:
> 
>> I've a readonly git repository that I'm hosting via HTTP (a bare git
>> repository located within the appropriate directory on the server). I
>> push to it via my own SSH account (local repository with a remote
>> pointing to the ssh:// URL).
>> 
>> This has all worked fine so far - I push via ssh, and others can clone
>> and pull via the HTTP URL.
>> 
>> I've recently added a branch - "beta" - which pushed just fine, but
>> now cloning via the HTTP URL doesn't seem to show the new branch -
>> just master:
> 
> If you are using the "dumb" http protocol (i.e., the web server knows
> nothing about git, and just serves the repo files), you need to run "git
> update-server-info" after each push in order to update the static file
> that tells the git client about each ref. You can have git do it
> automatically for you by setting receive.updateServerInfo in the server
> repo's config.
> 
> If the server is yours to control, consider setting up the "smart" http
> protocol, as it is much more efficient. Details are in "git help
> http-backend".
> 
> -Peff
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-01-30  0:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-29  5:54 Cloning remote HTTP repository: Can only see 'master' branch Michael Tyson
2013-01-29  8:23 ` Jeff King
2013-01-30  0:06   ` Michael Tyson

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).