"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: `populating an empty repository with got send'
To:
Sylvain Saboua <sylvain@saboua.me>
Cc:
Simon Harrison <info@simonh.uk>, Gameoftrees <gameoftrees@openbsd.org>
Date:
Sun, 16 Aug 2026 11:04:33 +0200

Download raw body.

Thread
The issue here is that cloning an empty repository will always fail,
and no got.conf file will be created. Sending to an empty repository
is possible but requires a got.conf file to be created first.

Perhaps we need to improve error reporting, or teach Got to handle
the empty clone case by creating an empty repository with a minimal
got.conf file that points at the server which the repository was
cloned from.

I am not sure if this would always lead to satisfactory results.
But it might be better than the current behaviour, which is clearly
non-intuitive unless one already knows how got.conf is used during
clone/fetch and send operations.

On Sat, Aug 15, 2026 at 06:08:36PM +0200, Sylvain Saboua wrote:
> Problem solved, I was confused to think that got would
> automatically register the source/origin credentials when
> cloning a repo.
> 
> On 2026-08-15 17:26, Simon Harrison wrote:
> > On Sat, 15 Aug 2026 15:41:02 +0200
> > Sylvain Saboua <sylvain@saboua.me> wrote:
> > 
> > > >  $ cd bkup
> > > >  $ got send -b main
> > > > got: origin: remote repository not found
> > > >  $ got send -b main sylvain@srv:bkup
> > > > got: sylvain@srv:bkup: remote repository not found
> > > >
> > > > Am I doing a mistake with the send command ?
> > 
> > It may be worth posting your local got.conf as got is reporting that it
> > can't find the remote repo:
> > 
> > > > got: origin: remote repository not found
> > 
> I'm sorry ... does got requires a local got.conf file in order to be
> able to send updates to the remote server it fetched the repo from ?!
> I don't remember needing nor configuring that when I first tried a got
> client some time ago ...
> 
> > For reference, this is what I use for sending to my servers (with using
> > gotd btw):
> > 
> > $ cat got.conf
> > remote "server1" {
> >   server server1.com
> >   protocol ssh
> >   repository "/home/simon/repo/simonh/simonh-scripts.git"
> > }
> > 
> > remote "server2" {
> >   server server1.com
> >   protocol ssh
> >   repository "/home/simon/repo/simonh/simonh-scripts.git"
> > }
> 
> Thanks, the following worked :
> 
>  $ pwd
> /Users/sylvansab/hax/got/bkup/
>  $ more .got/got.conf
> remote "origin" {
>         server sylvain@srv
>         protocol ssh
>         repository "bkup"
> }
>  $ got send
> Connecting to "origin" ssh://sylvain@srv/bkup
> 1 commit colored; 3 objects found; 1 tree scanned
> packing 1 reference; 3 objects; deltify: 100%; uploading pack:  236B 100%
> Server has accepted refs/heads/main
> 
> -- 
> Sylvain Saboua
> looking for a PDP-11
> 
>