Cannot get source using git

I'm using this command:
Code:
sudo git clone -b releng/12.2 --depth 1 https://git.freebsd.org/src.git 122src
to get the source for 12.2-RELEASE. It fails like this:

Code:
Cloning into '122src'...
fatal: unable to access 'https://git.freebsd.org/src.git/': Could not resolve host: git.freebsd.org

Am I using the correct command?
 
Capitalization doesn't matter in DNS names. You had a DNS failure, likely because of a network problem.
Code:
$ ping git.freebsd.org
PING gitmir.geo.freebsd.org (149.20.1.203): 56 data bytes
64 bytes from 149.20.1.203: icmp_seq=0 ttl=54 time=3.335 ms
64 bytes from 149.20.1.203: icmp_seq=1 ttl=54 time=3.402 ms
64 bytes from 149.20.1.203: icmp_seq=2 ttl=54 time=3.391 ms

Why are you cloning the source as root?
 
Why root: building in /usr/122src
Sources don't need to be checked out as root, they don't even need to be built by root. You can build it as a regular user as long as you set MAKEOBJDIRPREFIX to a directory that user can write to.

Code:
     MAKEOBJDIRPREFIX      Defines the prefix for directory names in the tree
                           of built objects.  Defaults to /usr/obj if not
                           defined.  This variable should only be set in the
                           environment or /etc/src-env.conf and not via
                           /etc/make.conf or /etc/src.conf or the command
                           line.
See build(7).
 
Sources don't need to be checked out as root, they don't even need to be built by root. You can build it as a regular user as long as you set MAKEOBJDIRPREFIX to a directory that user can write to.

Code:
     MAKEOBJDIRPREFIX      Defines the prefix for directory names in the tree
                           of built objects.  Defaults to /usr/obj if not
                           defined.  This variable should only be set in the
                           environment or /etc/src-env.conf and not via
                           /etc/make.conf or /etc/src.conf or the command
                           line.
See build(7).
Yes, I have built as a user sometimes. No particular reason I'm not doing it that way presently.
Cheers,
sprock
 
A typo?

Code:
root@mowa219-gjp4-8570p-freebsd:~ # ls -dhl /usr/src
drwxr-xr-x  27 root  wheel    44B Oct 19 22:31 /usr/src
root@mowa219-gjp4-8570p-freebsd:~ #
No. I have /usr/122src & /usr/122obj to distinguish them from my build of 13.0, which exists on the same host.
Cheers,
sprock
 
Back
Top