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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: bad path on github checkout error
To:
Ted Bullock <tbullock@comlore.com>
Cc:
gameoftrees@openbsd.org
Date:
Fri, 4 Feb 2022 13:13:03 +0100

Download raw body.

Thread
On Fri, Feb 04, 2022 at 04:59:23AM -0700, Ted Bullock wrote:
> On 2022-02-04 4:31 a.m., Ted Bullock wrote:
> > On 2022-02-04 4:24 a.m., Stefan Sperling wrote:
> > > On Fri, Feb 04, 2022 at 12:40:58AM -0700, Ted Bullock wrote:
> > > > New bug,
> > > > 
> > > > I tried to checkout a new repository tonight with from github and got is
> > > > complaining as follows:
> > > > 
> > > > $ got clone git@github.com:tbullock/OpenBSD-src.git
> > > 
> > > Got does not support this "alternative scp-style syntax", as Git calls
> > > it in git-clone(1).
> > > 
> > > You need to specify a protocol scheme (ssh://) at the front.
> > > You need to use a slash instead a colon.
> > > 
> > > A quick way to test URLs is with the -l option:
> > > 
> > > $ got clone -l ssh://git@github.com/tbullock/OpenBSD-src.git
> > > Connecting to git@github.com
> > > Host key fingerprint is
> > > SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
> > > HEAD: refs/heads/master
> > > refs/heads/master: be5ef64b1271055108e479f13d1a2405f04d0cf0
> > 
> > Did this change because I have an older version (0.66) installed on the
> > system from packages that does seem to accept that other syntax scheme.

Actually, you are right. I misrembered some details.

The scp-like syntax is indeed supported because it is required for reading
remote repository information from git's config file format.

As a side effect, such URLs also work on the command line.
This is not documented in the got(1) man page, however. I believe I did not
want to document this intentionally, because having an explicit protocol
scheme in the URL is better.

$ got clone -l git@github.com:tbullock/OpenBSD-src.git
Connecting to git@github.com
Host key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8
HEAD: refs/heads/master
refs/heads/master: be5ef64b1271055108e479f13d1a2405f04d0cf0
$

> > -current does not.
> 
> Actually testing that also doesn't work right either:
> 
> $ got clone -l ssh://git@github.com/tbullock/OpenBSD-src.git
> Connecting to git@github.com
> got: got_opentempfd: No such file or directory

That suggests a different issue. It looks like the hard-coded temporary
directory path (default is "/tmp") cannot be found, perhaps?
Is this a self-compiled binary, or was it installed from packages?

My test above was with got compiled from commit 9b4603c029086 (main) on
OpenBSD -current.