Composer require always fails even with personal token

Despite running
composer config --global --auth MYTOKEN

Where MYTOKEN is a token generated from with repository read, api and read user access.

When i run composer update with

"repositories": [
            "type": "gitlab",
            "url": ""

"require": {
        "myuser/myrepo-styleguide": "dev-master"

I get error

  Invalid credentials for '', aborting.

What am i missing?

If anyone steps into this please add the gitlab.accesstoken as a git configuration as described here