The output of grep nameserver /etc/resolv.conf is nameserver 127.0.0.53
This indicates that your machine is using itself (localhost) to handle DNS.
If you’re not running a DNS server on port 53 of this machine, then your system will not be able to translate packages.gitlab.com into an IP address, which is required to resolve the DNS query and fetch the packages.
To fix this, I suggest using a publicly available DNS provider like Google (188.8.131.52), Cloudflare (184.108.40.206), OpenDNS (220.127.116.11) or quad 9 (18.104.22.168).
This may not be the correct way of doing things, but I find it is a way that often works for me. If you are using Ubuntu as your OS, you may find you are using Dnsmasq, so your machine is using its self for DNS lookups. The guide below changes this to use a normal resolv.conf file. As I say it may not be the correct way of sorting this, but it seems to work a majority of the time.
You will either need to sudo su - (to become root) or run all these commands starting with sudo.
Check resolv.conf for me. It will probably be a link to /run/systemd/resolve/stub-resolv.conf
This will create a new link to the normal resolv.conf file.
Do an nslookup of the packages.gitlab.com again and check the connection like before. The second run of the nslookup should be from a different DNS server rather than from 127.0.0.53. It should be a normal DNS server this time.
Okay, so I followed your instructions and then ran the command nslookup packages.gitlab.com. The output was connection timed out; no servers could be reached
I get the same output when I run nslookup yahoo.com.
I finally installed the desktop edition of Ubuntu and am able to connect to the web via both wired (ethernet) and Wi-Fi. I’m not sure if I somehow installed the server edition wrong or if there was something wrong with the iso image that I downloaded.
I now have the GitLab Repo package installed and am playing around with it. Thank you everyone for your input and help!