CI_JOB_TOKEN doesn't work in includes [Reopen]

Hello everyone,

I reopen another issue you can found here : #23318 (closed) .

I reopen it because I'm encountering the same issue and I'm afraid, since the issue, is closed, that another message in the thread won't be answered.
I also already have looked in the gitlab forum.

Here's my issue :

I have several jobs that I include in my pipeline.

include:
    - project: 'mygroup/myproject'
      ref: '1.0.2'
      file: 'path/to/file.yml'
    - project: 'mygroup/myproject2'
      ref: '1.1.2'
      file: 'path/to/file2.yml'
    - project: 'mygroup/myproject3'
      ref: '1.2.2'
      file: 'path/to/file3.yml'

And, in one of the file(x).yml, I have a job that contains a curl to trigger another pipeline. This curl uses the CI_JOB_TOKEN.

But, when I run the pipeline, the CI_JOB_TOKEN does not work...

I tried by replacing the CI_JOB_TOKEN with a custom variable that contains the token that should be in CI_JOB_TOKEN. And it works, so I know that my curl works.

I saw that you have solved your problems with the link provided by @alex.sayle. But I don't understand how. I've tried to curl using the following example, but customized, of course, for my projects :

include: 'https://gitlab-ci-token:$CI_JOB_TOKEN@${gitHost}/group/project/blob/master/2beincluded.yml'

But it tells me that my yaml is not well formatted. And I think it is because, this url send me to the login page of gitlab...

So, I'm here, clueless. begging for help ^^'

Thank you very much !