Gitea migration: server certificate verification failed. CAfile: none CRLfile: none "SKIP_TLS_VERIFY = true"

Hi all,

I am trying to migrate git repos from a hosted gitlab server. The gitlab server doesn’t have a valid SSL cert, so I’ve put SKIP_TLS_VERIFY = true to the [migrations] section, but still the migration failes, that’s what I see in the log:

2022/03/22 10:45:24 ...ervices/task/task.go:56:handle() [E] Run task failed: Migration failed: Clone: exit status 128 - fatal: unable to access 'https://gitlabserver/frontend/masterui.git/': server certificate verification failed. CAfile: none CRLfile: none

I’ve tried to migrate as a gitlab repo (with access token) and as a git repo (user+pass), both gives the same result. I defined the repo in both case as http://, but during the migration somehow that changes to the https:// URL…

ps: First I mistyped the migrations section and used migration, quite annoying you don’t see any error, the settings just ignored in this case. Is there any way to dump the current config?

1 Like

Having the exact same issue 3 years later trying to migrate from a server with self-signed cert. Tried SKIP_TLS_VERIFY in migrations and in repository. Getting tls: failed to verify certificate: x509: certificate relies on legacy Common Name field, use SANs instead. I would also love to know if there’s a way to dump the current config. InsecureSkipVerify should be getting set.

After some debugging, I’ve found that the dump_repo command never calls LoadSettings at all. So SkipTLSVerify is set to false no matter what’s in app.ini.