In my case I was working with personal page, it was repo named pages
that located under your username, real example of mine: bramaudi/pages
. I have spend a day of debugging the problem with linking domain to my codeberg page.
Bit of context I why I'm using Cloudflare managed DNS are because I'm running self-host service based on Cloudflare tunnel, so I need to set my domain nameserver to cloudflare and they are handle the rest of DNS management.
Problem 1: 424 Failed Dependency "could not obtain repo owner from custom domain"
This occur when I'm using CNAME method, since I want to apply the root domain and with Cloudflare managed DNS seems it become problematic, I'm don't really know but looks like they're don't really support it or maybe it conflict with cloudflare tunnel for my self-hosting service since it also using CNAME.
Problem 2: 404 Not Found "gitea client failed"
The problem with this is it tries the main branch since I just setup the TXT record with value bramaudi.codeberg.page
instead of specify the TXT record to exact scheme including branch like pages.pages.bramaudi.codeberg.page
.
Solution
Now everything works as expected using below configuration, don't forget to turn off DNS proxy and set to DNS only in Cloudflare:
A
pointing to217.197.91.145
AAAA
pointing to2001:67c:1401:20f0::1
TXT
with valuepages.pages.bramaudi.codeberg.page
They should looks like this: