I looked around a bit and found the same error even with the most ancient versions of Kaniko. (02bb6dee319e7061f1e6459ed67db11acea659cc, 01329d5ac16043c0f7aa45a4be3202302bf695d5)
I can not believe that error was unnoticed for years, so I need advice on what is wrong with my setup.
May be I shall put something like "--secure --use-https" on the commandline?