Pipeline triggered by Pipeline git push fails with remote: HTTP Basic: Access denied

Summary

By doing a git push to a project from within a pipeline the triggered pipeline will fail with the error message.

Reinitialized existing Git repository in /home/gitlab-runner/builds/7C5sCf5m/0/engineering/repo/.git/
remote: HTTP Basic: Access denied

By manually clicking retry the job passes.

Steps to reproduce

Main pipeline:

test:
  script:
    - git clone http://root:${ACCESS_TOKEN}@<gitlab.com><domain>/<other_project>.git
    - cd <other_project>
    
    - touch a_file
    - git add .

    - git config user.email "@project_XXX_bot" && git config user.name "Bot"
    - git commit -am 'Update stuff' && git push

Other pipeline:

build:
  script:
    - echo "Do your build here"

What is the current bug behavior?

The other pipeline will fail with

Reinitialized existing Git repository in /home/gitlab-runner/builds/7C5sCf5m/0/engineering/repo/.git/
remote: HTTP Basic: Access denied

What is the expected correct behavior?

The other pipeline to run as normal.

related to Zendesk: https://gitlab.zendesk.com/agent/tickets/176202 (internal only)