Unable to use git username and password in platform_packages

I want to get custom package version from git (i wanted STM32G0 with CubeMX), but i didn’t want to put it in public repo. I tried doing it in this way in platformio.ini :

platform_packages = 
    framework-stm32cube @ https://name:key@gitlab.com/...

Obviously it breaks platformio, as splitting by '@' seems to be bad idea in that situation. Is there any way to bypass that?

Well, it seems that newer versions of ststm32 and stm32cube framework support STM32G0. Anyway, way to include authentication for git would be handy.

Out of me head I can think of three things: