How can you have a git server (not website) use with custom domain?

Say I have example.com and want to link git.example.com to a git server. This is so I can use git.example.com and not worry about moving hosts and reconfiguring origin.

Is it possible? I cannot self-host because I am behind NAT and don’t have ipv6.

  • poVoq@lemmy.ml
    link
    fedilink
    arrow-up
    3
    ·
    3 years ago

    Git works with SSH. If you can use that, you can point the domain to your current IP and connect with SSH. But I guess if your ISP blocks all ports, you need some sort of VPN tunnel.

    • not_a_cop@lemmy.mlOP
      link
      fedilink
      arrow-up
      1
      ·
      3 years ago

      I’m behind NAT so even ssh won’t work. I’m searching for a solution such as Github, Gitlab, Codeberg pages where it’ll host and I just have to configure DNS record.

      The pages features work for websites but I don’t think it’ll work for git.

      I could use tor but then people won’t be able to do git clone git.example.com

      • linkpop@lemmy.ml
        link
        fedilink
        arrow-up
        3
        ·
        3 years ago

        Just buy a VPS instance for $5/month or something, you can then stick gitlab/gitea/whatever you want on that and not have to deal with Tor/NATs.

        • not_a_cop@lemmy.mlOP
          link
          fedilink
          arrow-up
          2
          ·
          3 years ago

          Yeah a vps is the best way possible.

          given the plethora of git hosting services, I was surprised to not find a way to use custom domains.

          Anyway I’ll probably use a vps.