# Gitea migration: server certificate verification failed. CAfile: none CRLfile: none "SKIP\_TLS\_VERIFY = true"

**URL:** <https://forum.gitea.com/t/gitea-migration-server-certificate-verification-failed-cafile-none-crlfile-none-skip-tls-verify-true/4885>\
**Category:** Uncategorized\
**Created:** [March 22, 2022, 9:51am UTC](https://forum.gitea.com/t/gitea-migration-server-certificate-verification-failed-cafile-none-crlfile-none-skip-tls-verify-true/4885 "2022-03-22T09:51:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![atommaki](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/atommaki/32/2484_2.png) [@atommaki](https://forum.gitea.com/u/atommaki)\
**Post date:** [March 22, 2022, 9:51am UTC](https://forum.gitea.com/t/gitea-migration-server-certificate-verification-failed-cafile-none-crlfile-none-skip-tls-verify-true/4885/1 "2022-03-22T09:51:53Z")

</div>

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:

```auto
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?

---

<div class="post-metadata">

**Author:** ![elhil](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/elhil/32/6885_2.png) [@elhil](https://forum.gitea.com/u/elhil)\
**Post date:** [May 14, 2025, 7:53pm UTC](https://forum.gitea.com/t/gitea-migration-server-certificate-verification-failed-cafile-none-crlfile-none-skip-tls-verify-true/4885/2 "2025-05-14T19:53:57Z")

</div>

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](https://github.com/go-gitea/gitea/blob/b6bf128f1e1a943df85c1ce276d0317c8689ffca/services/migrations/http_client.go#L25).

---

<div class="post-metadata">

**Author:** ![elhil](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/elhil/32/6885_2.png) [@elhil](https://forum.gitea.com/u/elhil)\
**Post date:** [May 14, 2025, 10:57pm UTC](https://forum.gitea.com/t/gitea-migration-server-certificate-verification-failed-cafile-none-crlfile-none-skip-tls-verify-true/4885/3 "2025-05-14T22:57:56Z")

</div>

After some debugging, I’ve found that the [dump\_repo command](https://github.com/go-gitea/gitea/blob/dd500ce5598848e4f50999b627155ec8520932d3/cmd/dump_repo.go#L82) never calls [LoadSettings](https://github.com/go-gitea/gitea/blob/dd500ce5598848e4f50999b627155ec8520932d3/modules/setting/setting.go#L201) at all. So `SkipTLSVerify` is set to false no matter what’s in `app.ini`.
